Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 110 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 17987789 | 408 days ago | IN | 0 ETH | 0.00075887 | ||||
Set Approval For... | 17146385 | 526 days ago | IN | 0 ETH | 0.00201389 | ||||
Special Mint | 16847732 | 569 days ago | IN | 0.5 ETH | 0.00745622 | ||||
Giftmint | 16833128 | 571 days ago | IN | 0 ETH | 0.00141455 | ||||
Giftmint | 16777246 | 578 days ago | IN | 0 ETH | 0.00423015 | ||||
Giftmint | 16777245 | 578 days ago | IN | 0 ETH | 0.00422673 | ||||
Giftmint | 16777243 | 578 days ago | IN | 0 ETH | 0.00446224 | ||||
Giftmint | 16777242 | 578 days ago | IN | 0 ETH | 0.00544998 | ||||
Special Mint | 16772963 | 579 days ago | IN | 0.1 ETH | 0.0046431 | ||||
Special Mint | 16772954 | 579 days ago | IN | 0.45 ETH | 0.00913795 | ||||
Special Mint | 16769359 | 580 days ago | IN | 0.15 ETH | 0.003229 | ||||
Special Mint | 16769341 | 580 days ago | IN | 0.5 ETH | 0.00432302 | ||||
Special Mint | 16762659 | 581 days ago | IN | 0.05 ETH | 0.00583153 | ||||
Special Mint | 16762655 | 581 days ago | IN | 0.05 ETH | 0.00682237 | ||||
Special Mint | 16762356 | 581 days ago | IN | 0.65 ETH | 0.0077167 | ||||
Set Special Mint | 16762258 | 581 days ago | IN | 0 ETH | 0.00080564 | ||||
Special Mint | 16757500 | 581 days ago | IN | 0.05 ETH | 0.01037786 | ||||
Special Mint | 16752352 | 582 days ago | IN | 0.45 ETH | 0.00309675 | ||||
Special Mint | 16748455 | 583 days ago | IN | 0.4 ETH | 0.00856446 | ||||
Special Mint | 16748372 | 583 days ago | IN | 0.45 ETH | 0.00756127 | ||||
Special Mint | 16745835 | 583 days ago | IN | 0.5 ETH | 0.00291578 | ||||
Special Mint | 16745493 | 583 days ago | IN | 0.35 ETH | 0.0041823 | ||||
Special Mint | 16745191 | 583 days ago | IN | 0.35 ETH | 0.00829488 | ||||
Special Mint | 16742824 | 583 days ago | IN | 0.3 ETH | 0.0087231 | ||||
Set Approval For... | 16733681 | 585 days ago | IN | 0 ETH | 0.00114717 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16847732 | 569 days ago | 0.5 ETH | ||||
16772963 | 579 days ago | 0.1 ETH | ||||
16772954 | 579 days ago | 0.45 ETH | ||||
16769359 | 580 days ago | 0.15 ETH | ||||
16769341 | 580 days ago | 0.5 ETH | ||||
16762659 | 581 days ago | 0.05 ETH | ||||
16762655 | 581 days ago | 0.05 ETH | ||||
16762356 | 581 days ago | 0.65 ETH | ||||
16757500 | 581 days ago | 0.05 ETH | ||||
16752352 | 582 days ago | 0.45 ETH | ||||
16748455 | 583 days ago | 0.4 ETH | ||||
16748372 | 583 days ago | 0.45 ETH | ||||
16745835 | 583 days ago | 0.5 ETH | ||||
16745493 | 583 days ago | 0.35 ETH | ||||
16745191 | 583 days ago | 0.35 ETH | ||||
16742824 | 583 days ago | 0.3 ETH | ||||
16717150 | 587 days ago | 0.05 ETH | ||||
16700876 | 589 days ago | 0.05 ETH | ||||
16694923 | 590 days ago | 0.15 ETH | ||||
16694913 | 590 days ago | 0.5 ETH | ||||
16687348 | 591 days ago | 0.1 ETH | ||||
16685767 | 591 days ago | 0.15 ETH | ||||
16685684 | 591 days ago | 0.1 ETH | ||||
16684578 | 591 days ago | 0.05 ETH | ||||
16684068 | 592 days ago | 0.1 ETH |
Loading...
Loading
Contract Name:
GENPADNFT_v4
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT // Website : https://genpad.io pragma solidity ^0.8.17; import "./ERC721AQueryable.sol"; import "./IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract GENPADNFT_v4 is ERC721A, ERC721AQueryable, Ownable, ReentrancyGuard { struct SharedData { uint256 totalAmount; uint256 totalBoostedAmount; uint256 rewardPerShareEth; uint256 rewardPerShareToken; } struct Reward { uint256 totalExcludedEth; // excluded reward uint256 totalExcludedToken; uint256 lastClaim; } struct UserData { uint256 amount; uint256 boostedAmount; uint256 nftAmount; uint256 lockedTime; } //ERC Mapping struct TokenInfo { string name; address addr; uint256 price; bool enabled; } IERC20 public rewardToken; // Public variables uint256 public constant ACC_FACTOR = 10 ** 36; uint256 public MAX_MINTS = 100; uint256 public MAX_SUPPLY = 1000; uint256 public minLockTime = 7 days; uint256 public boostPerNft = 5; //5% uint256 public maxBoostAmount = 50; //50% uint256 public totalEthClaimed; uint256 public totalTokenClaimed; uint256 private addedTokens; bool public transferEnabled = true; bool public multisaleEnable = false; bool public bypricesaleEnable = false; bool public specialsaleEnable = true; // Special Mint uint256 public specialEthPrice; uint256 public specialTokenPrice; address public specialToken; uint256 public transferPrice = 0.05 ether; uint256 public refFee = 10; //10% SharedData public sharedData; bool public claimEnable = false; bool public lockEnable = true; bool public zeroLock; //mappings mapping(address => uint256) public ref; mapping(address => UserData) public userData; mapping(address => bool) public isExempted; mapping(address => bool) public isLocked; mapping(address => bool) public isBlackListed; mapping(address => Reward) public rewards; mapping(uint256 => TokenInfo) public allowedCrypto; // Royalties address address public royaltyAddress = 0x363D4053cfB4C77597117f1c5f178F3668801109; // Treasure address address public treasureAddress; // Royalties basis points (percentage using 2 decimals - 1000 = 100, 500 = 50, 0 = 0) 10% artist 90% flipper uint256 private royaltyBasisPoints = 100; // 10% //NFT events event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); event MintedNft(uint256 indexed _quantity, address add); event RoyaltyAddressUpdated( address newAddress, address oldAddress, uint256 time ); event UriUpdated(string newUri, uint256 time); event MintsPerWalletUpdated( uint256 newAmount, uint256 oldAmount, uint256 time ); event MaxSupplyUpdated(uint256 newAmount, uint256 oldAmount, uint256 time); event NewLock(address user, uint256 amount, uint256 boost); event RefFeeUpdated(uint256 newRefFee, uint256 oldRefFee, uint256 time); event RewardDeposited(bool isEth, uint256 amount, uint256 time); //Staking events event ClaimRewards( uint256 tokenId, uint256 _ethAmount, uint256 _tokenAmount, address recipient ); string public baseURI = "ipfs://bafybeickwunetdegtuzpltrhhog5vlc2uhwp4gwxrg5iag34l3kxhqeshq/"; address private signerAddress = 0xE10C4022882D087Ea412CbFdA745Ff841089E7Fe; /* CONSTRUCTOR */ constructor() ERC721A("GenPad NFTs", "yGENS") { allowedCrypto[addedTokens] = TokenInfo("ETH", address(0), 0.5 ether, true); addedTokens++; } // NFT Contract section function setrewardTokenAddress(address tokenAddress) external onlyOwner { rewardToken = IERC20(tokenAddress); } // Token Id start from 1 function _startTokenId() internal pure override returns (uint256) { return 1; } function TotalBurned() public view returns (uint256) { return _totalBurned(); } function next() public view returns (uint256) { return _nextTokenId(); } function toggleStatus( bool _specialsaleEnable, bool _bypricesaleEnable, bool _multisaleEnable, bool _transferEnabled ) external onlyOwner { specialsaleEnable = _specialsaleEnable; bypricesaleEnable = _bypricesaleEnable; multisaleEnable = _multisaleEnable; transferEnabled = _transferEnabled; } function setminLockTime(uint256 _minLockTime) external onlyOwner { minLockTime = _minLockTime; } function getSigner( address _toAddress, uint _quantity, address _refAddrses, bytes memory signature ) internal pure returns (address) { bytes32 hash = keccak256( abi.encodePacked(_toAddress, _quantity, _refAddrses) ); bytes32 message = ECDSA.toEthSignedMessageHash(hash); address signer = ECDSA.recover(message, signature); return signer; } function getSignerWithPrice( address _toAddress, uint _quantity, uint256 _price, bytes memory signature ) internal pure returns (address) { bytes32 hash = keccak256( abi.encodePacked(_toAddress, _quantity, _price) ); bytes32 message = ECDSA.toEthSignedMessageHash(hash); address signer = ECDSA.recover(message, signature); return signer; } function getSignerWithPriceRef( address _toAddress, uint _quantity, uint256 _price, address _refAddrses, bytes memory signature ) internal pure returns (address) { bytes32 hash = keccak256( abi.encodePacked(_toAddress, _quantity, _price, _refAddrses) ); bytes32 message = ECDSA.toEthSignedMessageHash(hash); address signer = ECDSA.recover(message, signature); return signer; } function giftmint(uint256 _quantity, address add) external onlyOwner { // _safeMint's second argument now takes in a quantity, not a tokenId. require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); _mint(add, _quantity); emit MintedNft(_quantity, add); } function emergencyWithdraw() external payable onlyOwner { (bool success,) = payable(owner()).call{value : address(this).balance}( "" ); require(success, "eth transfer failed"); } // Emergency ERC20 withdrawal function rescueERC20(address tokenAdd, uint256 amount) external onlyOwner { require( IERC20(tokenAdd).balanceOf(address(this)) >= amount, 'Insufficient ERC20 balance' ); IERC20(tokenAdd).transfer(owner(), amount); } // returns base uri function _baseURI() internal view override returns (string memory) { return baseURI; } // Set royalty address function setRoyaltyAddress(address _address) external onlyOwner { require(_address != address(0), "zero address passed"); address oldAddress = royaltyAddress; royaltyAddress = _address; emit RoyaltyAddressUpdated(_address, oldAddress, block.timestamp); } // Set base URI function setBaseURI(string memory _uri) external onlyOwner { baseURI = _uri; emit UriUpdated(_uri, block.timestamp); } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) external onlyOwner { require(_basisPoints <= 1000, "more than 100%"); royaltyBasisPoints = _basisPoints; emit RoyaltyBasisPoints(_basisPoints); } // Set new limit per wallet function changeMaxMintPerWallet( uint256 _max_mint_amount ) external onlyOwner { uint256 oldAmount = MAX_MINTS; MAX_MINTS = _max_mint_amount; emit MintsPerWalletUpdated( _max_mint_amount, oldAmount, block.timestamp ); } // Set new max supply function changeMaxSupply(uint256 _newSupply) external onlyOwner { require( _newSupply > MAX_SUPPLY, "new supply cannot be less than current" ); uint256 oldSupply = MAX_SUPPLY; MAX_SUPPLY = _newSupply; emit MaxSupplyUpdated(_newSupply, oldSupply, block.timestamp); } // TokenURI function tokenURI( uint256 tokenId ) public view virtual override(IERC721A, ERC721A) returns (string memory) { require(_exists(tokenId), "Nonexistent token"); return string(abi.encodePacked(_baseURI(), _toString(tokenId), ".json")); } function lock(uint256 amount) external { require(lockEnable, "lock temporary suspended"); require(!isBlackListed[_msgSender()], "you are blacklisted"); uint256 nftBalance = balanceOf(_msgSender()); require(amount > 0, "zero amount input"); uint256 totalAmount = amount * 10 ** rewardToken.decimals(); require( rewardToken.transferFrom(_msgSender(), address(this), totalAmount), "token transfer failed" ); isLocked[_msgSender()] = true; uint256 boostMultiplier; if (zeroLock) { boostMultiplier = (nftBalance * boostPerNft) > maxBoostAmount ? maxBoostAmount : (nftBalance) * boostPerNft; } else { require(nftBalance > 0, "nft balance 0"); boostMultiplier = ((nftBalance - 1) * boostPerNft) > maxBoostAmount ? maxBoostAmount : (nftBalance - 1) * boostPerNft; } uint256 boostedAmount = totalAmount + (totalAmount * boostMultiplier) / 100; sharedData.totalAmount += totalAmount; sharedData.totalBoostedAmount += boostedAmount; userData[_msgSender()].amount += totalAmount; userData[_msgSender()].boostedAmount += boostedAmount; userData[_msgSender()].nftAmount = nftBalance; userData[_msgSender()].lockedTime = block.timestamp; ( rewards[_msgSender()].totalExcludedEth, rewards[_msgSender()].totalExcludedToken ) = getCumulativeRewards(userData[_msgSender()].boostedAmount); emit NewLock(_msgSender(), totalAmount, boostMultiplier); } function unlock() public nonReentrant { require(lockEnable, "unlock temporary suspended"); require(!isBlackListed[_msgSender()], "you are blacklisted"); require( block.timestamp >= userData[_msgSender()].lockedTime + minLockTime, "lock not ended" ); sharedData.totalAmount -= userData[_msgSender()].amount; sharedData.totalBoostedAmount -= userData[_msgSender()].boostedAmount; //claim reward (uint256 unclaimedAmountEth, uint256 unclaimedAmountToken) = getUnpaid( _msgSender() ); if (unclaimedAmountEth > 0 || unclaimedAmountToken > 0) { _claim(_msgSender()); } require( rewardToken.transfer(_msgSender(), userData[_msgSender()].amount), "token transfer failed" ); isLocked[_msgSender()] = false; delete userData[_msgSender()]; } function depositRewardEth() external payable { require(msg.value > 0, "value must be greater than 0"); require( sharedData.totalBoostedAmount > 0, "must be shares deposited to be rewarded rewards" ); sharedData.rewardPerShareEth += (msg.value * ACC_FACTOR) / sharedData.totalBoostedAmount; emit RewardDeposited(true, msg.value, block.timestamp); } function depositRewardToken(uint256 amount) external payable { require(amount > 0, "value must be greater than 0"); require( sharedData.totalBoostedAmount > 0, "must be shares deposited to be rewarded rewards" ); require( rewardToken.transferFrom(_msgSender(), address(this), amount), "token transfer failed" ); sharedData.rewardPerShareToken += (amount * ACC_FACTOR) / sharedData.totalBoostedAmount; emit RewardDeposited(false, amount, block.timestamp); } function getCumulativeRewards( uint256 share ) internal view returns (uint256, uint256) { return ( (share * sharedData.rewardPerShareEth) / ACC_FACTOR, (share * sharedData.rewardPerShareToken) / ACC_FACTOR ); } function getUnpaid( address shareholder ) public view returns (uint256, uint256) { if (userData[shareholder].amount == 0) { return (0, 0); } ( uint256 earnedRewardsEth, uint256 earnedRewardsToken ) = getCumulativeRewards(userData[shareholder].boostedAmount); uint256 rewardsExcludedEth = rewards[shareholder].totalExcludedEth; uint256 rewardsExcludedToken = rewards[shareholder].totalExcludedToken; if ( earnedRewardsEth <= rewardsExcludedEth && earnedRewardsToken <= rewardsExcludedToken ) { return (0, 0); } return ( (earnedRewardsEth - rewardsExcludedEth), (earnedRewardsToken - rewardsExcludedToken) ); } function claim() external nonReentrant { _claim(_msgSender()); } function _claim(address user) internal { require( block.timestamp > rewards[user].lastClaim, "can only claim once per block" ); require(!isBlackListed[user], "you are blacklisted"); require(claimEnable, "claim temporary disabled"); require(userData[user].amount > 0, "no tokens staked"); (uint256 amountEth, uint256 amountToken) = getUnpaid(user); require(amountEth > 0 || amountToken > 0, "nothing to claim"); if (amountEth > 0) { totalEthClaimed += amountEth; (rewards[user].totalExcludedEth,) = getCumulativeRewards( userData[user].boostedAmount ); _handleEthTransfer(user, amountEth); } if (amountToken > 0) { totalTokenClaimed += amountToken; (, rewards[user].totalExcludedToken) = getCumulativeRewards( userData[user].boostedAmount ); require(rewardToken.transfer(user, amountToken)); } rewards[user].lastClaim = block.timestamp; } function flipZeroLockStatus() external onlyOwner { zeroLock = !zeroLock; } function flipLockStatus() external onlyOwner { lockEnable = !lockEnable; } function flipClaimStatus() external onlyOwner { claimEnable = !claimEnable; } function changeBoostPerNft(uint256 newBoost) external onlyOwner { //require(newBoost < Max_Value?, "boost exceed max value"); boostPerNft = newBoost; } function changeMaxBoost(uint256 newMaxBoost) external onlyOwner { //require(newMaxBoost < Max_Value?, "max boost exceed max value"); maxBoostAmount = newMaxBoost; } function setTreasureAddress(address _newTreasure) external onlyOwner { treasureAddress = _newTreasure; } function setSigner(address _signer) external onlyOwner { signerAddress = _signer; } function toggleBlacklistStatus(address[] memory users, bool[] memory status) external onlyOwner { require(users.length == status.length && users.length > 0, "wrong input"); for (uint i = 0; i < users.length; i++) { isBlackListed[users[i]] = status[i]; } } function toggleExemptionStatus(address[] memory users, bool[] memory status) external onlyOwner { require(users.length == status.length && users.length > 0, "wrong input"); for (uint i = 0; i < users.length; i++) { isExempted[users[i]] = status[i]; } } function changeRefFee(uint256 _newRefFee) external onlyOwner { require(_newRefFee <= 100, "More than 100%"); uint256 oldRefFee = refFee; refFee = _newRefFee; emit RefFeeUpdated(_newRefFee, oldRefFee, block.timestamp); } function isContract(address account) internal view returns (bool) { return account.code.length > 0; } //Multi ERC-Special //Add ERC20 Payment Tokens function addCurrency( string memory _name, address _add, uint256 _priceInWei, bool _enabled ) external onlyOwner { allowedCrypto[addedTokens] = TokenInfo( _name, _add, _priceInWei, _enabled ); addedTokens++; } // Disable Payment Tokens function disableToken(uint256 _id, bool _toggle) external onlyOwner { allowedCrypto[_id].enabled = _toggle; } function setSpecialMint( address tokenAddress, uint256 ethPrice, uint256 tokenPrice ) external onlyOwner { require(tokenAddress != address(0), "zero address"); specialToken = tokenAddress; specialEthPrice = ethPrice; specialTokenPrice = tokenPrice; } function specialMint(uint256 _quantity) external payable { require(specialToken != address(0), "special method not set"); require(specialsaleEnable, "Special Sale is not Enabled"); require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require( msg.value >= specialEthPrice * _quantity, "Not enough ETH send" ); _handleEthTransfer(owner(), msg.value); IERC20 tokenAddress = IERC20(specialToken); uint256 totalTokenPrice = specialTokenPrice * _quantity; require( tokenAddress.transferFrom(msg.sender, owner(), totalTokenPrice), "token transfer failed" ); _safeMint(_msgSender(), _quantity); emit MintedNft(_quantity, _msgSender()); } function specialMintByRef( uint256 _quantity, address _refAddress, bytes memory signature ) external payable { address _toAddress = _msgSender(); require(specialToken != address(0), "special method not set"); require(specialsaleEnable, "Special Sale is not Enabled"); require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require( getSigner(_toAddress, _quantity, _refAddress, signature) == signerAddress, "ECDSA check failed" ); require(_refAddress != _toAddress, "Don't cheat"); //transfer eth uint256 amountToRefEth = (msg.value * refFee) / 100; uint256 mintFeeEth = msg.value - amountToRefEth; _handleEthTransfer(owner(), mintFeeEth); _handleEthTransfer(_refAddress, amountToRefEth); //transfer tokens IERC20 tokenAddress = IERC20(specialToken); uint256 totalPrice = specialTokenPrice * _quantity; uint256 amountToRefToken = (totalPrice * refFee) / 100; uint256 mintFeeToken = totalPrice - amountToRefToken; require( tokenAddress.transferFrom( msg.sender, _refAddress, amountToRefToken ), "transfer to ref failed" ); require( tokenAddress.transferFrom(msg.sender, owner(), mintFeeToken), "transfer to owner failed" ); _safeMint(_msgSender(), _quantity); emit MintedNft(_quantity, _msgSender()); } function specialTransferFrom( address from, address to, uint256[] memory tokenIds ) public payable virtual { require(!isBlackListed[from], "you are blacklisted"); require(!isLocked[from], "unlock tokens before transfer"); require(tokenIds.length > 0, "empty array"); require( msg.value >= tokenIds.length * transferPrice, "not enough eth sent" ); for (uint i = 0; i < tokenIds.length; i++) { super.transferFrom(from, to, tokenIds[i]); } _handleEthTransfer(owner(), msg.value); } function _handleEthTransfer(address recipient, uint256 amount) internal { (bool success,) = payable(recipient).call{value : amount}(""); require(success, "ETH transfer failed"); } //Multi ERC20 Payment mint function multiMint(uint256 _quantity, uint256 _id) external payable { require(multisaleEnable, "Multi Sale is not Enabled"); require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require(allowedCrypto[_id].enabled, "This payment method is disabled"); uint256 _price = allowedCrypto[_id].price; _handleMintPayment(_id, _price, _quantity); _safeMint(_msgSender(), _quantity); emit MintedNft(_quantity, _msgSender()); } function multiMintbyref( uint256 _quantity, uint256 _id, address _refAddress, bytes memory signature ) external payable { address _toAddress = _msgSender(); require(multisaleEnable, "Multi Sale is not Enabled"); // _safeMint's second argument now takes in a quantity, not a tokenId. require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require(getSigner(_toAddress, _quantity, _refAddress, signature) == signerAddress, "ECDSA check failed"); require(_refAddress != _toAddress, "Don't cheat"); require(allowedCrypto[_id].enabled, "This payment method is disabled"); uint256 _price = allowedCrypto[_id].price; _handleRefFee(_id, _price, _quantity, _refAddress); _safeMint(_msgSender(), _quantity); ref[_refAddress] += _quantity; emit MintedNft(_quantity, _msgSender()); } //Mint by price function mintByPriceRef( uint256 _quantity, uint256 _id, uint256 _price, address _refAddress, bytes memory signature ) external payable { address _toAddress = _msgSender(); require(bypricesaleEnable, "Sale is not Enabled"); require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require(getSignerWithPriceRef(_toAddress, _quantity, _price, _refAddress, signature) == signerAddress, "ECDSA check failed"); require(allowedCrypto[_id].enabled, "This payment method is disabled"); _handleRefFee(_id, _price, _quantity, _refAddress); _safeMint(_msgSender(), _quantity); emit MintedNft(_quantity, _msgSender()); } //mint by price and ref function mintByPrice( uint256 _quantity, uint256 _id, uint256 _price, bytes memory signature ) external payable { address _toAddress = _msgSender(); require(bypricesaleEnable, "Sale is not Enabled"); require( _quantity + _numberMinted(_msgSender()) <= MAX_MINTS, "Exceeded the limit" ); require( totalSupply() + _quantity <= MAX_SUPPLY, "Not enough tokens left" ); require(getSignerWithPrice(_toAddress, _quantity, _price, signature) == signerAddress, "ECDSA check failed"); require(allowedCrypto[_id].enabled, "This payment method is disabled"); _handleMintPayment(_id, _price, _quantity); _safeMint(_msgSender(), _quantity); emit MintedNft(_quantity, _msgSender()); } function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override (ERC721A, IERC721A) { require(!isBlackListed[from], "you are blacklisted"); require(!isLocked[from], "unlock tokens before transfer"); if (!transferEnabled) { require(from == address(0) || isExempted[from], "transfer disabled"); } super.transferFrom(from, to, tokenId); } function _handleRefFee(uint256 _id, uint256 _price, uint256 _quantity, address _refAddress) internal { if (_id == 0) { //ETH Payment require(msg.value >= _price * _quantity, "Not enough ETH sent"); uint256 amountToRef = msg.value * refFee / 100; uint256 mintFee = msg.value - amountToRef; _handleEthTransfer(owner(), mintFee); _handleEthTransfer(_refAddress, amountToRef); } else { // ERC20 Payment IERC20 tokenAddress = IERC20(allowedCrypto[_id].addr); uint256 totalPrice = _price * _quantity; uint256 amountToRef = totalPrice * refFee / 100; uint256 mintFee = totalPrice - amountToRef; require(tokenAddress.transferFrom(msg.sender, owner(), mintFee), "transfer to owner failed"); require(tokenAddress.transferFrom(msg.sender, _refAddress, amountToRef), "transfer to ref failed"); } } function _handleMintPayment(uint256 _id, uint256 _price, uint256 _quantity) internal { if (_id == 0) { //ETH Payment require(msg.value >= _price * _quantity, "Not enough ETH send"); _handleEthTransfer(owner(), msg.value); } else { // ERC20 Payment IERC20 tokenAddress = IERC20(allowedCrypto[_id].addr); uint256 totalPrice = _price * _quantity; require(tokenAddress.transferFrom(msg.sender, owner(), totalPrice), "transfer failed"); } } receive() external payable {} }
// 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) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // 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 (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// 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); } } }
// 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) revert OwnerQueryForNonexistentToken(); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; return packed; } } // Otherwise, the data exists and is not burned. We can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. return packed; } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck) if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import './ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"MaxSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"address","name":"add","type":"address"}],"name":"MintedNft","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"MintsPerWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"boost","type":"uint256"}],"name":"NewLock","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":"uint256","name":"newRefFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldRefFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RefFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isEth","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RewardDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RoyaltyAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_royaltyBasisPoints","type":"uint256"}],"name":"RoyaltyBasisPoints","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":"string","name":"newUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"UriUpdated","type":"event"},{"inputs":[],"name":"ACC_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TotalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_add","type":"address"},{"internalType":"uint256","name":"_priceInWei","type":"uint256"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"addCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedCrypto","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostPerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bypricesaleEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newBoost","type":"uint256"}],"name":"changeBoostPerNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxBoost","type":"uint256"}],"name":"changeMaxBoost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_max_mint_amount","type":"uint256"}],"name":"changeMaxMintPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSupply","type":"uint256"}],"name":"changeMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newRefFee","type":"uint256"}],"name":"changeRefFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositRewardEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositRewardToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"bool","name":"_toggle","type":"bool"}],"name":"disableToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipClaimStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipLockStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipZeroLockStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"shareholder","type":"address"}],"name":"getUnpaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"add","type":"address"}],"name":"giftmint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlackListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExempted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBoostAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintByPrice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"_refAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintByPriceRef","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"multiMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_refAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"multiMintbyref","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"multisaleEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"next","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ref","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAdd","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"totalExcludedEth","type":"uint256"},{"internalType":"uint256","name":"totalExcludedToken","type":"uint256"},{"internalType":"uint256","name":"lastClaim","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_basisPoints","type":"uint256"}],"name":"setRoyaltyBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"ethPrice","type":"uint256"},{"internalType":"uint256","name":"tokenPrice","type":"uint256"}],"name":"setSpecialMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTreasure","type":"address"}],"name":"setTreasureAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minLockTime","type":"uint256"}],"name":"setminLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setrewardTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharedData","outputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"uint256","name":"totalBoostedAmount","type":"uint256"},{"internalType":"uint256","name":"rewardPerShareEth","type":"uint256"},{"internalType":"uint256","name":"rewardPerShareToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"specialEthPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"specialMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_refAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"specialMintByRef","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"specialToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"specialTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"specialTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"specialsaleEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"bool[]","name":"status","type":"bool[]"}],"name":"toggleBlacklistStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"bool[]","name":"status","type":"bool[]"}],"name":"toggleExemptionStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_specialsaleEnable","type":"bool"},{"internalType":"bool","name":"_bypricesaleEnable","type":"bool"},{"internalType":"bool","name":"_multisaleEnable","type":"bool"},{"internalType":"bool","name":"_transferEnabled","type":"bool"}],"name":"toggleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEthClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasureAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userData","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"boostedAmount","type":"uint256"},{"internalType":"uint256","name":"nftAmount","type":"uint256"},{"internalType":"uint256","name":"lockedTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zeroLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6064600b8190556103e8600c5562093a80600d556005600e556032600f5560138054630100000163ffffffff1990911617905566b1a2bc2ec50000601755600a601855601d805461ffff1916610100908117909155602580546001600160a01b03191673363d4053cfb4c77597117f1c5f178f366880110917905560279190915560405260436080818152906200622d60a039602890620000a190826200030d565b50602980546001600160a01b03191673e10c4022882d087ea412cbfda745ff841089e7fe179055348015620000d557600080fd5b506040518060400160405280600b81526020016a47656e506164204e46547360a81b815250604051806040016040528060058152602001647947454e5360d81b81525081600290816200012991906200030d565b5060036200013882826200030d565b50506001600055506200014b3362000216565b600160098190556040805160c0810182526003608082019081526208aa8960eb1b60a08301528152600060208083018290526706f05b59d3b2000083850152606083019490945260125481526024909352912081518190620001ae90826200030d565b5060208201516001820180546001600160a01b0319166001600160a01b03909216919091179055604082015160028201556060909101516003909101805460ff1916911515919091179055601280549060006200020b83620003d9565b919050555062000401565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200029357607f821691505b602082108103620002b457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200030857600081815260208120601f850160051c81016020861015620002e35750805b601f850160051c820191505b818110156200030457828155600101620002ef565b5050505b505050565b81516001600160401b0381111562000329576200032962000268565b62000341816200033a84546200027e565b84620002ba565b602080601f831160018114620003795760008415620003605750858301515b600019600386901b1c1916600185901b17855562000304565b600085815260208120601f198616915b82811015620003aa5788860151825594840194600190910190840162000389565b5085821015620003c95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018201620003fa57634e487b7160e01b600052601160045260246000fd5b5060010190565b615e1c80620004116000396000f3fe6080604052600436106104fb5760003560e01c806374c8c6111161028c578063bfed5a6e1161015a578063db2e21bc116100cc578063e47d606011610085578063e47d606014610f52578063e8771bb414610f82578063e985e9c514610f95578063ec2e0ab314610fde578063f2fde38b14610ff4578063f7c618c11461101457600080fd5b8063db2e21bc14610eb0578063dd46706414610eb8578063decc1a8614610ed8578063df83bf6e14610ef8578063dfa51e1114610f1b578063e06c9f7d14610f3c57600080fd5b8063c4b6ebdf1161011e578063c4b6ebdf14610dd5578063c6598bee14610e02578063c87b56dd14610e18578063c891091314610e38578063cce132d114610e7a578063d46f6b0314610e9057600080fd5b8063bfed5a6e14610d42578063c089bd7414610d55578063c08cb51a14610d68578063c23dc68f14610d88578063c36b933214610db557600080fd5b806399a2557a116101fe578063a92176be116101b7578063a92176be14610c90578063a9688f7614610caf578063ad1ac83c14610ccf578063ad2f852a14610cef578063b6b8194014610d0f578063b88d4fde14610d2f57600080fd5b806399a2557a14610bef578063a082a09a14610c0f578063a22cb46514610c25578063a60ff76614610c45578063a6365c4a14610c5b578063a69df4b514610c7b57600080fd5b80638462151c116102505780638462151c14610b2557806389d9691714610b525780638cd4426d14610b875780638da5cb5b14610ba757806395d89b4114610bc5578063982e17de14610bda57600080fd5b806374c8c61114610abe5780637ab3c04f14610ad45780637f631e4714610ae75780638126e7cf14610b0757806381cd819414610b0f57600080fd5b806334262ca4116103c9578063533687af1161033b57806360b77480116102f457806360b7748014610a145780636352211e14610a345780636c0360eb14610a545780636c19e78314610a6957806370a0823114610a89578063715018a614610aa957600080fd5b8063533687af1461093757806355f804b31461095157806357510492146109715780635a1a822f146109845780635b1549c1146109a45780635bbb2177146109e757600080fd5b806342c342eb1161038d57806342c342eb1461088e5780634a4fbeec146108ae5780634c8fe526146108de5780634cd412d5146108f35780634e71d92d1461090d5780635006e44d1461092257600080fd5b806334262ca414610806578063384fb6621461081c5780633f03442b1461083c578063404c7cdd1461085b57806342842e0e1461087b57600080fd5b806315bfafcd1161046d578063221ac77111610426578063221ac7711461077257806323b872dd146107885780632aa569cd1461079b5780632bbad092146107bb5780632db0c07c146107db57806332cb6b0c146107f057600080fd5b806315bfafcd146106d45780631794bcdf146106f757806318160ddd146107175780631d1421781461072c5780631fc220271461074c578063219f453d1461075f57600080fd5b8063081812fc116104bf578063081812fc14610606578063081815db1461063e57806308ea92651461066e578063095ea7b31461068e5780630ecdf1e6146106a15780630f14b4f4146106c157600080fd5b806301ffc9a71461050757806306d254da1461053c57806306fdde031461055e5780630700037d14610580578063079eb7fb146105d757600080fd5b3661050257005b600080fd5b34801561051357600080fd5b50610527610522366004614f24565b611034565b60405190151581526020015b60405180910390f35b34801561054857600080fd5b5061055c610557366004614f58565b611086565b005b34801561056a57600080fd5b50610573611140565b6040516105339190614fc3565b34801561058c57600080fd5b506105bc61059b366004614f58565b60236020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610533565b3480156105e357600080fd5b506105276105f2366004614f58565b602080526000908152604090205460ff1681565b34801561061257600080fd5b50610626610621366004614fd6565b6111d2565b6040516001600160a01b039091168152602001610533565b34801561064a57600080fd5b5061065e610659366004614fd6565b611216565b6040516105339493929190614fef565b34801561067a57600080fd5b5061055c610689366004614fd6565b6112d5565b61055c61069c366004615029565b611325565b3480156106ad57600080fd5b50601d546105279062010000900460ff1681565b61055c6106cf366004615108565b611335565b3480156106e057600080fd5b506106e96114a4565b604051908152602001610533565b34801561070357600080fd5b5061055c610712366004615206565b6114b4565b34801561072357600080fd5b506106e961158d565b34801561073857600080fd5b5061055c610747366004614f58565b61159b565b61055c61075a3660046152c5565b6115c5565b61055c61076d3660046152e7565b611709565b34801561077e57600080fd5b506106e9600f5481565b61055c61079636600461533d565b611b0f565b3480156107a757600080fd5b50601654610626906001600160a01b031681565b3480156107c757600080fd5b5061055c6107d6366004614fd6565b611c33565b3480156107e757600080fd5b5061055c611c40565b3480156107fc57600080fd5b506106e9600c5481565b34801561081257600080fd5b506106e960115481565b34801561082857600080fd5b506013546105279062010000900460ff1681565b34801561084857600080fd5b5060135461052790610100900460ff1681565b34801561086757600080fd5b5061055c610876366004614fd6565b611c5c565b61055c61088936600461533d565b611d0c565b34801561089a57600080fd5b5061055c6108a9366004615206565b611d27565b3480156108ba57600080fd5b506105276108c9366004614f58565b60216020526000908152604090205460ff1681565b3480156108ea57600080fd5b506000546106e9565b3480156108ff57600080fd5b506013546105279060ff1681565b34801561091957600080fd5b5061055c611dfb565b34801561092e57600080fd5b5061055c611e18565b34801561094357600080fd5b50601d546105279060ff1681565b34801561095d57600080fd5b5061055c61096c366004615379565b611e3f565b61055c61097f366004614fd6565b611e90565b34801561099057600080fd5b5061055c61099f366004614fd6565b6120d2565b3480156109b057600080fd5b50601954601a54601b54601c546109c79392919084565b604080519485526020850193909352918301526060820152608001610533565b3480156109f357600080fd5b50610a07610a023660046153ad565b6120df565b604051610533919061545d565b348015610a2057600080fd5b5061055c610a2f36600461549f565b6121aa565b348015610a4057600080fd5b50610626610a4f366004614fd6565b612220565b348015610a6057600080fd5b5061057361222b565b348015610a7557600080fd5b5061055c610a84366004614f58565b6122b9565b348015610a9557600080fd5b506106e9610aa4366004614f58565b6122e3565b348015610ab557600080fd5b5061055c612331565b348015610aca57600080fd5b506106e960105481565b61055c610ae23660046154d2565b612343565b348015610af357600080fd5b5061055c610b02366004615585565b6124d0565b61055c6124fb565b348015610b1b57600080fd5b506106e960175481565b348015610b3157600080fd5b50610b45610b40366004614f58565b6125e8565b60405161053391906155b5565b348015610b5e57600080fd5b50610b72610b6d366004614f58565b6126f0565b60408051928352602083019190915201610533565b348015610b9357600080fd5b5061055c610ba2366004615029565b6127af565b348015610bb357600080fd5b506008546001600160a01b0316610626565b348015610bd157600080fd5b50610573612901565b348015610be657600080fd5b5061055c612910565b348015610bfb57600080fd5b50610b45610c0a36600461549f565b612935565b348015610c1b57600080fd5b506106e960155481565b348015610c3157600080fd5b5061055c610c403660046155ed565b612abc565b348015610c5157600080fd5b506106e9600d5481565b348015610c6757600080fd5b5061055c610c76366004615619565b612b28565b348015610c8757600080fd5b5061055c612b9e565b348015610c9c57600080fd5b50601d5461052790610100900460ff1681565b348015610cbb57600080fd5b5061055c610cca366004615645565b612df5565b348015610cdb57600080fd5b5061055c610cea3660046156ae565b612eb0565b348015610cfb57600080fd5b50602554610626906001600160a01b031681565b348015610d1b57600080fd5b5061055c610d2a366004614fd6565b612f04565b61055c610d3d3660046156ff565b612f82565b61055c610d5036600461574e565b612fcc565b61055c610d63366004614fd6565b6131d3565b348015610d7457600080fd5b5061055c610d83366004614fd6565b613351565b348015610d9457600080fd5b50610da8610da3366004614fd6565b61335e565b6040516105339190615796565b348015610dc157600080fd5b5061055c610dd0366004614f58565b6133e6565b348015610de157600080fd5b506106e9610df0366004614f58565b601e6020526000908152604090205481565b348015610e0e57600080fd5b506106e960145481565b348015610e2457600080fd5b50610573610e33366004614fd6565b613410565b348015610e4457600080fd5b506109c7610e53366004614f58565b601f6020526000908152604090208054600182015460028301546003909301549192909184565b348015610e8657600080fd5b506106e9600b5481565b348015610e9c57600080fd5b50602654610626906001600160a01b031681565b61055c613493565b348015610ec457600080fd5b5061055c610ed3366004614fd6565b613548565b348015610ee457600080fd5b5061055c610ef3366004614fd6565b613946565b348015610f0457600080fd5b506106e96ec097ce7bc90715b34b9f100000000081565b348015610f2757600080fd5b50601354610527906301000000900460ff1681565b348015610f4857600080fd5b506106e9600e5481565b348015610f5e57600080fd5b50610527610f6d366004614f58565b60226020526000908152604090205460ff1681565b61055c610f903660046157a4565b6139d8565b348015610fa157600080fd5b50610527610fb036600461580e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fea57600080fd5b506106e960185481565b34801561100057600080fd5b5061055c61100f366004614f58565b613b2b565b34801561102057600080fd5b50600a54610626906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b03198316148061106557506380ac58cd60e01b6001600160e01b03198316145b806110805750635b5e139f60e01b6001600160e01b03198316145b92915050565b61108e613ba1565b6001600160a01b0381166110df5760405162461bcd60e51b81526020600482015260136024820152721e995c9bc81859191c995cdcc81c185cdcd959606a1b60448201526064015b60405180910390fd5b602580546001600160a01b038381166001600160a01b03198316179092556040519116907f2a57488c87619b8c17cdafd7d02db4daca22075796392e34fdab763a03dcbc2e9061113490849084904290615838565b60405180910390a15050565b60606002805461114f9061585c565b80601f016020809104026020016040519081016040528092919081815260200182805461117b9061585c565b80156111c85780601f1061119d576101008083540402835291602001916111c8565b820191906000526020600020905b8154815290600101906020018083116111ab57829003601f168201915b5050505050905090565b60006111dd82613bfb565b6111fa576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6024602052600090815260409020805481906112319061585c565b80601f016020809104026020016040519081016040528092919081815260200182805461125d9061585c565b80156112aa5780601f1061127f576101008083540402835291602001916112aa565b820191906000526020600020905b81548152906001019060200180831161128d57829003601f168201915b505050506001830154600284015460039094015492936001600160a01b039091169290915060ff1684565b6112dd613ba1565b600b805490829055604080518381526020810183905242918101919091527f6a210311c15e53c0bd9fa7790881b00bd2e71d686c9bfebb02b63dae0230080090606001611134565b61133182826001613c30565b5050565b601354339062010000900460ff166113855760405162461bcd60e51b815260206004820152601360248201527214d85b19481a5cc81b9bdd08115b98589b1959606a1b60448201526064016110d6565b600b5461139133613cd7565b61139b90876158ac565b11156113b95760405162461bcd60e51b81526004016110d6906158bf565b600c54856113c561158d565b6113cf91906158ac565b11156113ed5760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b031661140582878686613cff565b6001600160a01b03161461142b5760405162461bcd60e51b81526004016110d69061591b565b60008481526024602052604090206003015460ff1661145c5760405162461bcd60e51b81526004016110d690615947565b611467848487613d6c565b6114713386613ec9565b84600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a25050505050565b60006114af60015490565b905090565b6114bc613ba1565b805182511480156114ce575060008251115b6115085760405162461bcd60e51b815260206004820152600b60248201526a1ddc9bdb99c81a5b9c1d5d60aa1b60448201526064016110d6565b60005b8251811015611588578181815181106115265761152661597e565b6020026020010151602060008584815181106115445761154461597e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061158081615994565b91505061150b565b505050565b600154600054036000190190565b6115a3613ba1565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b601354610100900460ff166116185760405162461bcd60e51b8152602060048201526019602482015278135d5b1d1a4814d85b19481a5cc81b9bdd08115b98589b1959603a1b60448201526064016110d6565b600b5461162433613cd7565b61162e90846158ac565b111561164c5760405162461bcd60e51b81526004016110d6906158bf565b600c548261165861158d565b61166291906158ac565b11156116805760405162461bcd60e51b81526004016110d6906158eb565b60008181526024602052604090206003015460ff166116b15760405162461bcd60e51b81526004016110d690615947565b6000818152602460205260409020600201546116ce828285613d6c565b6116d83384613ec9565b82600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a2505050565b60165433906001600160a01b031661175c5760405162461bcd60e51b81526020600482015260166024820152751cdc1958da585b081b595d1a1bd9081b9bdd081cd95d60521b60448201526064016110d6565b6013546301000000900460ff166117b55760405162461bcd60e51b815260206004820152601b60248201527f5370656369616c2053616c65206973206e6f7420456e61626c6564000000000060448201526064016110d6565b600b546117c133613cd7565b6117cb90866158ac565b11156117e95760405162461bcd60e51b81526004016110d6906158bf565b600c54846117f561158d565b6117ff91906158ac565b111561181d5760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b031661183582868686613ee3565b6001600160a01b03161461185b5760405162461bcd60e51b81526004016110d69061591b565b806001600160a01b0316836001600160a01b0316036118aa5760405162461bcd60e51b815260206004820152600b60248201526a111bdb89dd0818da19585d60aa1b60448201526064016110d6565b60006064601854346118bc91906159ad565b6118c691906159c4565b905060006118d482346159e6565b90506118f16118eb6008546001600160a01b031690565b82613f18565b6118fb8583613f18565b6016546015546001600160a01b039091169060009061191b9089906159ad565b9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061194782846159e6565b6040516323b872dd60e01b81529091506001600160a01b038516906323b872dd9061197a9033908d908790600401615838565b6020604051808303816000875af1158015611999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bd91906159f9565b611a025760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881d1bc81c99598819985a5b195960521b60448201526064016110d6565b836001600160a01b03166323b872dd33611a246008546001600160a01b031690565b846040518463ffffffff1660e01b8152600401611a4393929190615838565b6020604051808303816000875af1158015611a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8691906159f9565b611acd5760405162461bcd60e51b81526020600482015260186024820152771d1c985b9cd9995c881d1bc81bdddb995c8819985a5b195960421b60448201526064016110d6565b611ad7338b613ec9565b89600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a250505050505050505050565b6001600160a01b03831660009081526022602052604090205460ff1615611b485760405162461bcd60e51b81526004016110d690615a16565b6001600160a01b03831660009081526021602052604090205460ff1615611bb15760405162461bcd60e51b815260206004820152601d60248201527f756e6c6f636b20746f6b656e73206265666f7265207472616e7366657200000060448201526064016110d6565b60135460ff16611c28576001600160a01b0383161580611be857506001600160a01b038316600090815260208052604090205460ff165b611c285760405162461bcd60e51b81526020600482015260116024820152701d1c985b9cd9995c88191a5cd8589b1959607a1b60448201526064016110d6565b611588838383613fb1565b611c3b613ba1565b600f55565b611c48613ba1565b601d805460ff19811660ff90911615179055565b611c64613ba1565b600c548111611cc45760405162461bcd60e51b815260206004820152602660248201527f6e657720737570706c792063616e6e6f74206265206c657373207468616e20636044820152651d5c9c995b9d60d21b60648201526084016110d6565b600c805490829055604080518381526020810183905242918101919091527f708949a737b310dd5b3a011a4f5b1985f9ee4c69334aaa1613866e6f16f0334a90606001611134565b61158883838360405180602001604052806000815250612f82565b611d2f613ba1565b80518251148015611d41575060008251115b611d7b5760405162461bcd60e51b815260206004820152600b60248201526a1ddc9bdb99c81a5b9c1d5d60aa1b60448201526064016110d6565b60005b825181101561158857818181518110611d9957611d9961597e565b602002602001015160226000858481518110611db757611db761597e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611df381615994565b915050611d7e565b611e0361414a565b611e0c336141a3565b611e166001600955565b565b611e20613ba1565b601d805462ff0000198116620100009182900460ff1615909102179055565b611e47613ba1565b6028611e538282615a89565b507f01eea250d558aa782ce24d87688c3b361432f2f932afefbf4f42fb8788b91b878142604051611e85929190615b48565b60405180910390a150565b6016546001600160a01b0316611ee15760405162461bcd60e51b81526020600482015260166024820152751cdc1958da585b081b595d1a1bd9081b9bdd081cd95d60521b60448201526064016110d6565b6013546301000000900460ff16611f3a5760405162461bcd60e51b815260206004820152601b60248201527f5370656369616c2053616c65206973206e6f7420456e61626c6564000000000060448201526064016110d6565b600b54611f4633613cd7565b611f5090836158ac565b1115611f6e5760405162461bcd60e51b81526004016110d6906158bf565b600c5481611f7a61158d565b611f8491906158ac565b1115611fa25760405162461bcd60e51b81526004016110d6906158eb565b80601454611fb091906159ad565b341015611ff55760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b99606a1b60448201526064016110d6565b61201061200a6008546001600160a01b031690565b34613f18565b6016546015546001600160a01b03909116906000906120309084906159ad565b9050816001600160a01b03166323b872dd336120546008546001600160a01b031690565b846040518463ffffffff1660e01b815260040161207393929190615838565b6020604051808303816000875af1158015612092573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b691906159f9565b6116ce5760405162461bcd60e51b81526004016110d690615b6a565b6120da613ba1565b600e55565b6060816000816001600160401b038111156120fc576120fc615053565b60405190808252806020026020018201604052801561214e57816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161211a5790505b50905060005b8281146121a15761217c8686838181106121705761217061597e565b9050602002013561335e565b82828151811061218e5761218e61597e565b6020908102919091010152600101612154565b50949350505050565b6121b2613ba1565b6001600160a01b0383166121f75760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016110d6565b601680546001600160a01b0319166001600160a01b039490941693909317909255601455601555565b6000611080826144b1565b602880546122389061585c565b80601f01602080910402602001604051908101604052809291908181526020018280546122649061585c565b80156122b15780601f10612286576101008083540402835291602001916122b1565b820191906000526020600020905b81548152906001019060200180831161229457829003601f168201915b505050505081565b6122c1613ba1565b602980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03821661230c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b612339613ba1565b611e16600061453d565b6001600160a01b03831660009081526022602052604090205460ff161561237c5760405162461bcd60e51b81526004016110d690615a16565b6001600160a01b03831660009081526021602052604090205460ff16156123e55760405162461bcd60e51b815260206004820152601d60248201527f756e6c6f636b20746f6b656e73206265666f7265207472616e7366657200000060448201526064016110d6565b60008151116124245760405162461bcd60e51b815260206004820152600b60248201526a656d70747920617272617960a81b60448201526064016110d6565b601754815161243391906159ad565b3410156124785760405162461bcd60e51b81526020600482015260136024820152721b9bdd08195b9bdd59da08195d1a081cd95b9d606a1b60448201526064016110d6565b60005b81518110156124ba576124a8848484848151811061249b5761249b61597e565b6020026020010151613fb1565b806124b281615994565b91505061247b565b5061158861200a6008546001600160a01b031690565b6124d8613ba1565b600091825260246020526040909120600301805460ff1916911515919091179055565b6000341161254b5760405162461bcd60e51b815260206004820152601c60248201527f76616c7565206d7573742062652067726561746572207468616e20300000000060448201526064016110d6565b601a5461256a5760405162461bcd60e51b81526004016110d690615b99565b601a546125866ec097ce7bc90715b34b9f1000000000346159ad565b61259091906159c4565b601b80546000906125a29084906158ac565b90915550506040805160018152346020820152428183015290517f68a3ded46bf5c11ca6b12cbb1e938f3981d6a4e96bba054e196a1657eb34a9319181900360600190a1565b606060008060006125f8856122e3565b90506000816001600160401b0381111561261457612614615053565b60405190808252806020026020018201604052801561263d578160200160208202803683370190505b50905061266a60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146126e45761267d8161458f565b915081604001516126dc5781516001600160a01b03161561269d57815194505b876001600160a01b0316856001600160a01b0316036126dc57808387806001019850815181106126cf576126cf61597e565b6020026020010181815250505b60010161266d565b50909695505050505050565b6001600160a01b0381166000908152601f60205260408120548190810361271c57506000928392509050565b6001600160a01b0383166000908152601f60205260408120600101548190612743906145cb565b6001600160a01b038716600090815260236020526040902080546001909101549294509092509081841180159061277a5750808311155b1561278e5750600096879650945050505050565b61279882856159e6565b6127a282856159e6565b9550955050505050915091565b6127b7613ba1565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa1580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128219190615be8565b101561286f5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742045524332302062616c616e636500000000000060448201526064016110d6565b816001600160a01b031663a9059cbb6128906008546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156128dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158891906159f9565b60606003805461114f9061585c565b612918613ba1565b601d805461ff001981166101009182900460ff1615909102179055565b606081831061295757604051631960ccad60e11b815260040160405180910390fd5b60008061296360005490565b9050600185101561297357600194505b8084111561297f578093505b600061298a876122e3565b9050848610156129a957858503818110156129a3578091505b506129ad565b5060005b6000816001600160401b038111156129c7576129c7615053565b6040519080825280602002602001820160405280156129f0578160200160208202803683370190505b50905081600003612a06579350612ab592505050565b6000612a118861335e565b905060008160400151612a22575080515b885b888114158015612a345750848714155b15612aa957612a428161458f565b92508260400151612aa15782516001600160a01b031615612a6257825191505b8a6001600160a01b0316826001600160a01b031603612aa15780848880600101995081518110612a9457612a9461597e565b6020026020010181815250505b600101612a24565b50505092835250909150505b9392505050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612b30613ba1565b600c5482612b3c61158d565b612b4691906158ac565b1115612b645760405162461bcd60e51b81526004016110d6906158eb565b612b6e818361462a565b6040516001600160a01b03821681528290600080516020615dc78339815191529060200160405180910390a25050565b612ba661414a565b601d54610100900460ff16612bfd5760405162461bcd60e51b815260206004820152601a60248201527f756e6c6f636b2074656d706f726172792073757370656e64656400000000000060448201526064016110d6565b3360009081526022602052604090205460ff1615612c2d5760405162461bcd60e51b81526004016110d690615a16565b600d54336000908152601f6020526040902060030154612c4d91906158ac565b421015612c8d5760405162461bcd60e51b815260206004820152600e60248201526d1b1bd8dac81b9bdd08195b99195960921b60448201526064016110d6565b336000908152601f60205260408120546019805491929091612cb09084906159e6565b9091555050336000908152601f6020526040812060010154601a805491929091612cdb9084906159e6565b909155506000905080612ced336126f0565b915091506000821180612d005750600081115b15612d0e57612d0e336141a3565b600a54336000818152601f6020908152604080832054815163a9059cbb60e01b815260048101959095526024850152516001600160a01b039094169363a9059cbb936044808201949183900301908290875af1158015612d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9691906159f9565b612db25760405162461bcd60e51b81526004016110d690615b6a565b5050336000908152602160209081526040808320805460ff19169055601f9091528120818155600181810183905560028201839055600390910191909155600955565b612dfd613ba1565b604080516080810182528581526001600160a01b0385166020808301919091528183018590528315156060830152601254600090815260249091529190912081518190612e4a9082615a89565b5060208201516001820180546001600160a01b0319166001600160a01b03909216919091179055604082015160028201556060909101516003909101805460ff191691151591909117905560128054906000612ea583615994565b919050555050505050565b612eb8613ba1565b6013805463ffff0000191663010000009515159590950262ff000019169490941762010000931515939093029290921761ffff19166101009115159190910260ff191617901515179055565b612f0c613ba1565b6103e8811115612f4f5760405162461bcd60e51b815260206004820152600e60248201526d6d6f7265207468616e203130302560901b60448201526064016110d6565b602781905560405181907fce3498f3236889c7e9256b3643e0f7fae5a1b912f2ac0daa1d89236c70b522c690600090a250565b612f8d848484611b0f565b6001600160a01b0383163b15612fc657612fa984848484614728565b612fc6576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6013543390610100900460ff166130215760405162461bcd60e51b8152602060048201526019602482015278135d5b1d1a4814d85b19481a5cc81b9bdd08115b98589b1959603a1b60448201526064016110d6565b600b5461302d33613cd7565b61303790876158ac565b11156130555760405162461bcd60e51b81526004016110d6906158bf565b600c548561306161158d565b61306b91906158ac565b11156130895760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b03166130a182878686613ee3565b6001600160a01b0316146130c75760405162461bcd60e51b81526004016110d69061591b565b806001600160a01b0316836001600160a01b0316036131165760405162461bcd60e51b815260206004820152600b60248201526a111bdb89dd0818da19585d60aa1b60448201526064016110d6565b60008481526024602052604090206003015460ff166131475760405162461bcd60e51b81526004016110d690615947565b60008481526024602052604090206002015461316585828887614810565b613170335b87613ec9565b6001600160a01b0384166000908152601e6020526040812080548892906131989084906158ac565b90915550869050600080516020615dc7833981519152335b6040516001600160a01b03909116815260200160405180910390a2505050505050565b600081116132235760405162461bcd60e51b815260206004820152601c60248201527f76616c7565206d7573742062652067726561746572207468616e20300000000060448201526064016110d6565b601a546132425760405162461bcd60e51b81526004016110d690615b99565b600a546001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161327493929190615838565b6020604051808303816000875af1158015613293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132b791906159f9565b6132d35760405162461bcd60e51b81526004016110d690615b6a565b601a546132ef6ec097ce7bc90715b34b9f1000000000836159ad565b6132f991906159c4565b601c805460009061330b9084906158ac565b909155505060408051600081526020810183905242918101919091527f68a3ded46bf5c11ca6b12cbb1e938f3981d6a4e96bba054e196a1657eb34a93190606001611e85565b613359613ba1565b600d55565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806133b757506000548310155b156133c25792915050565b6133cb8361458f565b90508060400151156133dd5792915050565b612ab583614a9a565b6133ee613ba1565b602680546001600160a01b0319166001600160a01b0392909216919091179055565b606061341b82613bfb565b61345b5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016110d6565b613463614acf565b61346c83614ade565b60405160200161347d929190615c01565b6040516020818303038152906040529050919050565b61349b613ba1565b60006134af6008546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d80600081146134f9576040519150601f19603f3d011682016040523d82523d6000602084013e6134fe565b606091505b50509050806135455760405162461bcd60e51b8152602060048201526013602482015272195d1a081d1c985b9cd9995c8819985a5b1959606a1b60448201526064016110d6565b50565b601d54610100900460ff1661359f5760405162461bcd60e51b815260206004820152601860248201527f6c6f636b2074656d706f726172792073757370656e646564000000000000000060448201526064016110d6565b3360009081526022602052604090205460ff16156135cf5760405162461bcd60e51b81526004016110d690615a16565b60006135da336122e3565b9050600082116136205760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d081a5b9c1d5d607a1b60448201526064016110d6565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa15801561366a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368e9190615c40565b61369990600a615d47565b6136a390846159ad565b600a546040516323b872dd60e01b81529192506001600160a01b0316906323b872dd906136d890339030908690600401615838565b6020604051808303816000875af11580156136f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061371b91906159f9565b6137375760405162461bcd60e51b81526004016110d690615b6a565b336000908152602160205260408120805460ff19166001179055601d5462010000900460ff161561379457600f54600e5461377290856159ad565b1161378957600e5461378490846159ad565b61378d565b600f545b9050613818565b600083116137d45760405162461bcd60e51b815260206004820152600d60248201526c06e66742062616c616e6365203609c1b60448201526064016110d6565b600f54600e546137e56001866159e6565b6137ef91906159ad565b1161381157600e546138026001856159e6565b61380c91906159ad565b613815565b600f545b90505b6000606461382683856159ad565b61383091906159c4565b61383a90846158ac565b9050826019600001600082825461385191906158ac565b9091555050601a805482919060009061386b9084906158ac565b9091555050336000908152601f60205260408120805485929061388f9084906158ac565b9091555050336000908152601f6020526040812060010180548392906138b69084906158ac565b9091555050336000908152601f6020526040902060028101859055426003820155600101546138e4906145cb565b336000818152602360209081526040918290206001810194909455939092558151908152918201859052818101849052517f7879fe07a34927cf93a00574a8c2e55740a44179eb359ed6850e486df16c52229181900360600190a15050505050565b61394e613ba1565b60648111156139905760405162461bcd60e51b815260206004820152600e60248201526d4d6f7265207468616e203130302560901b60448201526064016110d6565b6018805490829055604080518381526020810183905242918101919091527f05705bbfdb2ae341a1fb81bfbd5105e0330557e7cf96fdeeed6b9b7ef96e006a90606001611134565b601354339062010000900460ff16613a285760405162461bcd60e51b815260206004820152601360248201527214d85b19481a5cc81b9bdd08115b98589b1959606a1b60448201526064016110d6565b600b54613a3433613cd7565b613a3e90886158ac565b1115613a5c5760405162461bcd60e51b81526004016110d6906158bf565b600c5486613a6861158d565b613a7291906158ac565b1115613a905760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b0316613aa98288878787614b22565b6001600160a01b031614613acf5760405162461bcd60e51b81526004016110d69061591b565b60008581526024602052604090206003015460ff16613b005760405162461bcd60e51b81526004016110d690615947565b613b0c85858886614810565b613b153361316a565b85600080516020615dc7833981519152336131b0565b613b33613ba1565b6001600160a01b038116613b985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016110d6565b6135458161453d565b6008546001600160a01b03163314611e165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016110d6565b600081600111158015613c0f575060005482105b8015611080575050600090815260046020526040902054600160e01b161590565b6000613c3b83612220565b90508115613c7a57336001600160a01b03821614613c7a57613c5d8133610fb0565b613c7a576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6001600160a01b03166000908152600560205260409081902054901c6001600160401b031690565b6040516001600160601b0319606086901b166020820152603481018490526054810183905260009081906074015b6040516020818303038152906040528051906020012090506000613d5082614b97565b90506000613d5e8286614bea565b93505050505b949350505050565b82600003613dd857613d7e81836159ad565b341015613dc35760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b99606a1b60448201526064016110d6565b61158861200a6008546001600160a01b031690565b6000838152602460205260408120600101546001600160a01b031690613dfe83856159ad565b9050816001600160a01b03166323b872dd33613e226008546001600160a01b031690565b846040518463ffffffff1660e01b8152600401613e4193929190615838565b6020604051808303816000875af1158015613e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8491906159f9565b613ec25760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016110d6565b5050505050565b611331828260405180602001604052806000815250614c0e565b6040516001600160601b0319606086811b821660208401526034830186905284901b1660548201526000908190606801613d2d565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613f65576040519150601f19603f3d011682016040523d82523d6000602084013e613f6a565b606091505b50509050806115885760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b60448201526064016110d6565b6000613fbc826144b1565b9050836001600160a01b0316816001600160a01b031614613fef5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761403c5761401f8633610fb0565b61403c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661406357604051633a954ecd60e21b815260040160405180910390fd5b801561406e57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003614100576001840160008181526004602052604081205490036140fe5760005481146140fe5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60026009540361419c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016110d6565b6002600955565b6001600160a01b038116600090815260236020526040902060020154421161420d5760405162461bcd60e51b815260206004820152601d60248201527f63616e206f6e6c7920636c61696d206f6e63652070657220626c6f636b00000060448201526064016110d6565b6001600160a01b03811660009081526022602052604090205460ff16156142465760405162461bcd60e51b81526004016110d690615a16565b601d5460ff166142985760405162461bcd60e51b815260206004820152601860248201527f636c61696d2074656d706f726172792064697361626c6564000000000000000060448201526064016110d6565b6001600160a01b0381166000908152601f60205260409020546142f05760405162461bcd60e51b815260206004820152601060248201526f1b9bc81d1bdad95b9cc81cdd185ad95960821b60448201526064016110d6565b6000806142fc836126f0565b91509150600082118061430f5750600081115b61434e5760405162461bcd60e51b815260206004820152601060248201526f6e6f7468696e6720746f20636c61696d60801b60448201526064016110d6565b81156143b457816010600082825461436691906158ac565b90915550506001600160a01b0383166000908152601f6020526040902060010154614390906145cb565b506001600160a01b0384166000908152602360205260409020556143b48383613f18565b801561448f5780601160008282546143cc91906158ac565b90915550506001600160a01b0383166000908152601f60205260409020600101546143f6906145cb565b6001600160a01b038581166000818152602360205260409081902060010193909355600a54925163a9059cbb60e01b81526004810191909152602481018590529116915063a9059cbb906044016020604051808303816000875af1158015614462573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061448691906159f9565b61448f57600080fd5b50506001600160a01b0316600090815260236020526040902042600290910155565b600081600111614524575060008181526004602052604081205490600160e01b82169003614524578060000361451f57600054821061450357604051636f96cda160e11b815260040160405180910390fd5b5b50600019016000818152600460205260409020548015614504575b919050565b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461108090614c74565b6000806ec097ce7bc90715b34b9f1000000000601960020154846145ef91906159ad565b6145f991906159c4565b601c546ec097ce7bc90715b34b9f10000000009061461790866159ad565b61462191906159c4565b91509150915091565b600080549082900361464f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146146fe57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016146c6565b508160000361471f57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061475d903390899088908890600401615d56565b6020604051808303816000875af1925050508015614798575060408051601f3d908101601f1916820190925261479591810190615d93565b60015b6147f6573d8080156147c6576040519150601f19603f3d011682016040523d82523d6000602084013e6147cb565b606091505b5080516000036147ee576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613d64565b836000036148b95761482282846159ad565b3410156148675760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b60448201526064016110d6565b600060646018543461487991906159ad565b61488391906159c4565b9050600061489182346159e6565b90506148a86118eb6008546001600160a01b031690565b6148b28383613f18565b5050612fc6565b6000848152602460205260408120600101546001600160a01b0316906148df84866159ad565b905060006064601854836148f391906159ad565b6148fd91906159c4565b9050600061490b82846159e6565b9050836001600160a01b03166323b872dd3361492f6008546001600160a01b031690565b846040518463ffffffff1660e01b815260040161494e93929190615838565b6020604051808303816000875af115801561496d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061499191906159f9565b6149d85760405162461bcd60e51b81526020600482015260186024820152771d1c985b9cd9995c881d1bc81bdddb995c8819985a5b195960421b60448201526064016110d6565b6040516323b872dd60e01b81526001600160a01b038516906323b872dd90614a0890339089908790600401615838565b6020604051808303816000875af1158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b91906159f9565b614a905760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881d1bc81c99598819985a5b195960521b60448201526064016110d6565b5050505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152611080614aca836144b1565b614c74565b60606028805461114f9061585c565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480614af85750819003601f19909101908152919050565b6040516001600160601b0319606087811b82166020840152603483018790526054830186905284901b16607482015260009081906088016040516020818303038152906040528051906020012090506000614b7c82614b97565b90506000614b8a8286614bea565b9998505050505050505050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000614bf98585614cbb565b91509150614c0681614d00565b509392505050565b614c18838361462a565b6001600160a01b0383163b15611588576000548281035b614c426000868380600101945086614728565b614c5f576040516368d2bf6b60e11b815260040160405180910390fd5b818110614c2f578160005414613ec257600080fd5b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6000808251604103614cf15760208301516040840151606085015160001a614ce587828585614e4a565b94509450505050614cf9565b506000905060025b9250929050565b6000816004811115614d1457614d14615db0565b03614d1c5750565b6001816004811115614d3057614d30615db0565b03614d7d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016110d6565b6002816004811115614d9157614d91615db0565b03614dde5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016110d6565b6003816004811115614df257614df2615db0565b036135455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016110d6565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614e815750600090506003614f05565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614ed5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614efe57600060019250925050614f05565b9150600090505b94509492505050565b6001600160e01b03198116811461354557600080fd5b600060208284031215614f3657600080fd5b8135612ab581614f0e565b80356001600160a01b038116811461451f57600080fd5b600060208284031215614f6a57600080fd5b612ab582614f41565b60005b83811015614f8e578181015183820152602001614f76565b50506000910152565b60008151808452614faf816020860160208601614f73565b601f01601f19169290920160200192915050565b602081526000612ab56020830184614f97565b600060208284031215614fe857600080fd5b5035919050565b6080815260006150026080830187614f97565b6001600160a01b039590951660208301525060408101929092521515606090910152919050565b6000806040838503121561503c57600080fd5b61504583614f41565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561509157615091615053565b604052919050565b600082601f8301126150aa57600080fd5b81356001600160401b038111156150c3576150c3615053565b6150d6601f8201601f1916602001615069565b8181528460208386010111156150eb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561511e57600080fd5b84359350602085013592506040850135915060608501356001600160401b0381111561514957600080fd5b61515587828801615099565b91505092959194509250565b60006001600160401b0382111561517a5761517a615053565b5060051b60200190565b801515811461354557600080fd5b600082601f8301126151a357600080fd5b813560206151b86151b383615161565b615069565b82815260059290921b840181019181810190868411156151d757600080fd5b8286015b848110156151fb5780356151ee81615184565b83529183019183016151db565b509695505050505050565b6000806040838503121561521957600080fd5b82356001600160401b038082111561523057600080fd5b818501915085601f83011261524457600080fd5b813560206152546151b383615161565b82815260059290921b8401810191818101908984111561527357600080fd5b948201945b838610156152985761528986614f41565b82529482019490820190615278565b965050860135925050808211156152ae57600080fd5b506152bb85828601615192565b9150509250929050565b600080604083850312156152d857600080fd5b50508035926020909101359150565b6000806000606084860312156152fc57600080fd5b8335925061530c60208501614f41565b915060408401356001600160401b0381111561532757600080fd5b61533386828701615099565b9150509250925092565b60008060006060848603121561535257600080fd5b61535b84614f41565b925061536960208501614f41565b9150604084013590509250925092565b60006020828403121561538b57600080fd5b81356001600160401b038111156153a157600080fd5b613d6484828501615099565b600080602083850312156153c057600080fd5b82356001600160401b03808211156153d757600080fd5b818501915085601f8301126153eb57600080fd5b8135818111156153fa57600080fd5b8660208260051b850101111561540f57600080fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156126e45761548c838551615421565b9284019260809290920191600101615479565b6000806000606084860312156154b457600080fd5b6154bd84614f41565b95602085013595506040909401359392505050565b6000806000606084860312156154e757600080fd5b6154f084614f41565b925060206154ff818601614f41565b925060408501356001600160401b0381111561551a57600080fd5b8501601f8101871361552b57600080fd5b80356155396151b382615161565b81815260059190911b8201830190838101908983111561555857600080fd5b928401925b828410156155765783358252928401929084019061555d565b80955050505050509250925092565b6000806040838503121561559857600080fd5b8235915060208301356155aa81615184565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156126e4578351835292840192918401916001016155d1565b6000806040838503121561560057600080fd5b61560983614f41565b915060208301356155aa81615184565b6000806040838503121561562c57600080fd5b8235915061563c60208401614f41565b90509250929050565b6000806000806080858703121561565b57600080fd5b84356001600160401b0381111561567157600080fd5b61567d87828801615099565b94505061568c60208601614f41565b92506040850135915060608501356156a381615184565b939692955090935050565b600080600080608085870312156156c457600080fd5b84356156cf81615184565b935060208501356156df81615184565b925060408501356156ef81615184565b915060608501356156a381615184565b6000806000806080858703121561571557600080fd5b61571e85614f41565b935061572c60208601614f41565b92506040850135915060608501356001600160401b0381111561514957600080fd5b6000806000806080858703121561576457600080fd5b843593506020850135925061577b60408601614f41565b915060608501356001600160401b0381111561514957600080fd5b608081016110808284615421565b600080600080600060a086880312156157bc57600080fd5b8535945060208601359350604086013592506157da60608701614f41565b915060808601356001600160401b038111156157f557600080fd5b61580188828901615099565b9150509295509295909350565b6000806040838503121561582157600080fd5b61582a83614f41565b915061563c60208401614f41565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600181811c9082168061587057607f821691505b60208210810361589057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561108057611080615896565b602080825260129082015271115e18d959591959081d1a19481b1a5b5a5d60721b604082015260600190565b602080825260169082015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b604082015260600190565b6020808252601290820152711150d114d04818da1958dac819985a5b195960721b604082015260600190565b6020808252601f908201527f54686973207061796d656e74206d6574686f642069732064697361626c656400604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016159a6576159a6615896565b5060010190565b808202811582820484141761108057611080615896565b6000826159e157634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561108057611080615896565b600060208284031215615a0b57600080fd5b8151612ab581615184565b6020808252601390820152721e5bdd48185c9948189b1858dadb1a5cdd1959606a1b604082015260600190565b601f82111561158857600081815260208120601f850160051c81016020861015615a6a5750805b601f850160051c820191505b8181101561414257828155600101615a76565b81516001600160401b03811115615aa257615aa2615053565b615ab681615ab0845461585c565b84615a43565b602080601f831160018114615aeb5760008415615ad35750858301515b600019600386901b1c1916600185901b178555614142565b600085815260208120601f198616915b82811015615b1a57888601518255948401946001909101908401615afb565b5085821015615b385787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000615b5b6040830185614f97565b90508260208301529392505050565b6020808252601590820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b6020808252602f908201527f6d75737420626520736861726573206465706f736974656420746f206265207260408201526e65776172646564207265776172647360881b606082015260800190565b600060208284031215615bfa57600080fd5b5051919050565b60008351615c13818460208801614f73565b835190830190615c27818360208801614f73565b64173539b7b760d91b9101908152600501949350505050565b600060208284031215615c5257600080fd5b815160ff81168114612ab557600080fd5b600181815b80851115615c9e578160001904821115615c8457615c84615896565b80851615615c9157918102915b93841c9390800290615c68565b509250929050565b600082615cb557506001611080565b81615cc257506000611080565b8160018114615cd85760028114615ce257615cfe565b6001915050611080565b60ff841115615cf357615cf3615896565b50506001821b611080565b5060208310610133831016604e8410600b8410161715615d21575081810a611080565b615d2b8383615c63565b8060001904821115615d3f57615d3f615896565b029392505050565b6000612ab560ff841683615ca6565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d8990830184614f97565b9695505050505050565b600060208284031215615da557600080fd5b8151612ab581614f0e565b634e487b7160e01b600052602160045260246000fdfeb069a28fab2f4a275fc364c15d220c5884271a144db6d116d13dcb79c8181c6ca2646970667358221220e73caceafd0fa60db92ba077c7ebd09c2940bd3129dcc64c6b46c4d19c0ce1d664736f6c63430008110033697066733a2f2f62616679626569636b77756e657464656774757a706c747268686f6735766c6332756877703467777872673569616733346c336b786871657368712f
Deployed Bytecode
0x6080604052600436106104fb5760003560e01c806374c8c6111161028c578063bfed5a6e1161015a578063db2e21bc116100cc578063e47d606011610085578063e47d606014610f52578063e8771bb414610f82578063e985e9c514610f95578063ec2e0ab314610fde578063f2fde38b14610ff4578063f7c618c11461101457600080fd5b8063db2e21bc14610eb0578063dd46706414610eb8578063decc1a8614610ed8578063df83bf6e14610ef8578063dfa51e1114610f1b578063e06c9f7d14610f3c57600080fd5b8063c4b6ebdf1161011e578063c4b6ebdf14610dd5578063c6598bee14610e02578063c87b56dd14610e18578063c891091314610e38578063cce132d114610e7a578063d46f6b0314610e9057600080fd5b8063bfed5a6e14610d42578063c089bd7414610d55578063c08cb51a14610d68578063c23dc68f14610d88578063c36b933214610db557600080fd5b806399a2557a116101fe578063a92176be116101b7578063a92176be14610c90578063a9688f7614610caf578063ad1ac83c14610ccf578063ad2f852a14610cef578063b6b8194014610d0f578063b88d4fde14610d2f57600080fd5b806399a2557a14610bef578063a082a09a14610c0f578063a22cb46514610c25578063a60ff76614610c45578063a6365c4a14610c5b578063a69df4b514610c7b57600080fd5b80638462151c116102505780638462151c14610b2557806389d9691714610b525780638cd4426d14610b875780638da5cb5b14610ba757806395d89b4114610bc5578063982e17de14610bda57600080fd5b806374c8c61114610abe5780637ab3c04f14610ad45780637f631e4714610ae75780638126e7cf14610b0757806381cd819414610b0f57600080fd5b806334262ca4116103c9578063533687af1161033b57806360b77480116102f457806360b7748014610a145780636352211e14610a345780636c0360eb14610a545780636c19e78314610a6957806370a0823114610a89578063715018a614610aa957600080fd5b8063533687af1461093757806355f804b31461095157806357510492146109715780635a1a822f146109845780635b1549c1146109a45780635bbb2177146109e757600080fd5b806342c342eb1161038d57806342c342eb1461088e5780634a4fbeec146108ae5780634c8fe526146108de5780634cd412d5146108f35780634e71d92d1461090d5780635006e44d1461092257600080fd5b806334262ca414610806578063384fb6621461081c5780633f03442b1461083c578063404c7cdd1461085b57806342842e0e1461087b57600080fd5b806315bfafcd1161046d578063221ac77111610426578063221ac7711461077257806323b872dd146107885780632aa569cd1461079b5780632bbad092146107bb5780632db0c07c146107db57806332cb6b0c146107f057600080fd5b806315bfafcd146106d45780631794bcdf146106f757806318160ddd146107175780631d1421781461072c5780631fc220271461074c578063219f453d1461075f57600080fd5b8063081812fc116104bf578063081812fc14610606578063081815db1461063e57806308ea92651461066e578063095ea7b31461068e5780630ecdf1e6146106a15780630f14b4f4146106c157600080fd5b806301ffc9a71461050757806306d254da1461053c57806306fdde031461055e5780630700037d14610580578063079eb7fb146105d757600080fd5b3661050257005b600080fd5b34801561051357600080fd5b50610527610522366004614f24565b611034565b60405190151581526020015b60405180910390f35b34801561054857600080fd5b5061055c610557366004614f58565b611086565b005b34801561056a57600080fd5b50610573611140565b6040516105339190614fc3565b34801561058c57600080fd5b506105bc61059b366004614f58565b60236020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610533565b3480156105e357600080fd5b506105276105f2366004614f58565b602080526000908152604090205460ff1681565b34801561061257600080fd5b50610626610621366004614fd6565b6111d2565b6040516001600160a01b039091168152602001610533565b34801561064a57600080fd5b5061065e610659366004614fd6565b611216565b6040516105339493929190614fef565b34801561067a57600080fd5b5061055c610689366004614fd6565b6112d5565b61055c61069c366004615029565b611325565b3480156106ad57600080fd5b50601d546105279062010000900460ff1681565b61055c6106cf366004615108565b611335565b3480156106e057600080fd5b506106e96114a4565b604051908152602001610533565b34801561070357600080fd5b5061055c610712366004615206565b6114b4565b34801561072357600080fd5b506106e961158d565b34801561073857600080fd5b5061055c610747366004614f58565b61159b565b61055c61075a3660046152c5565b6115c5565b61055c61076d3660046152e7565b611709565b34801561077e57600080fd5b506106e9600f5481565b61055c61079636600461533d565b611b0f565b3480156107a757600080fd5b50601654610626906001600160a01b031681565b3480156107c757600080fd5b5061055c6107d6366004614fd6565b611c33565b3480156107e757600080fd5b5061055c611c40565b3480156107fc57600080fd5b506106e9600c5481565b34801561081257600080fd5b506106e960115481565b34801561082857600080fd5b506013546105279062010000900460ff1681565b34801561084857600080fd5b5060135461052790610100900460ff1681565b34801561086757600080fd5b5061055c610876366004614fd6565b611c5c565b61055c61088936600461533d565b611d0c565b34801561089a57600080fd5b5061055c6108a9366004615206565b611d27565b3480156108ba57600080fd5b506105276108c9366004614f58565b60216020526000908152604090205460ff1681565b3480156108ea57600080fd5b506000546106e9565b3480156108ff57600080fd5b506013546105279060ff1681565b34801561091957600080fd5b5061055c611dfb565b34801561092e57600080fd5b5061055c611e18565b34801561094357600080fd5b50601d546105279060ff1681565b34801561095d57600080fd5b5061055c61096c366004615379565b611e3f565b61055c61097f366004614fd6565b611e90565b34801561099057600080fd5b5061055c61099f366004614fd6565b6120d2565b3480156109b057600080fd5b50601954601a54601b54601c546109c79392919084565b604080519485526020850193909352918301526060820152608001610533565b3480156109f357600080fd5b50610a07610a023660046153ad565b6120df565b604051610533919061545d565b348015610a2057600080fd5b5061055c610a2f36600461549f565b6121aa565b348015610a4057600080fd5b50610626610a4f366004614fd6565b612220565b348015610a6057600080fd5b5061057361222b565b348015610a7557600080fd5b5061055c610a84366004614f58565b6122b9565b348015610a9557600080fd5b506106e9610aa4366004614f58565b6122e3565b348015610ab557600080fd5b5061055c612331565b348015610aca57600080fd5b506106e960105481565b61055c610ae23660046154d2565b612343565b348015610af357600080fd5b5061055c610b02366004615585565b6124d0565b61055c6124fb565b348015610b1b57600080fd5b506106e960175481565b348015610b3157600080fd5b50610b45610b40366004614f58565b6125e8565b60405161053391906155b5565b348015610b5e57600080fd5b50610b72610b6d366004614f58565b6126f0565b60408051928352602083019190915201610533565b348015610b9357600080fd5b5061055c610ba2366004615029565b6127af565b348015610bb357600080fd5b506008546001600160a01b0316610626565b348015610bd157600080fd5b50610573612901565b348015610be657600080fd5b5061055c612910565b348015610bfb57600080fd5b50610b45610c0a36600461549f565b612935565b348015610c1b57600080fd5b506106e960155481565b348015610c3157600080fd5b5061055c610c403660046155ed565b612abc565b348015610c5157600080fd5b506106e9600d5481565b348015610c6757600080fd5b5061055c610c76366004615619565b612b28565b348015610c8757600080fd5b5061055c612b9e565b348015610c9c57600080fd5b50601d5461052790610100900460ff1681565b348015610cbb57600080fd5b5061055c610cca366004615645565b612df5565b348015610cdb57600080fd5b5061055c610cea3660046156ae565b612eb0565b348015610cfb57600080fd5b50602554610626906001600160a01b031681565b348015610d1b57600080fd5b5061055c610d2a366004614fd6565b612f04565b61055c610d3d3660046156ff565b612f82565b61055c610d5036600461574e565b612fcc565b61055c610d63366004614fd6565b6131d3565b348015610d7457600080fd5b5061055c610d83366004614fd6565b613351565b348015610d9457600080fd5b50610da8610da3366004614fd6565b61335e565b6040516105339190615796565b348015610dc157600080fd5b5061055c610dd0366004614f58565b6133e6565b348015610de157600080fd5b506106e9610df0366004614f58565b601e6020526000908152604090205481565b348015610e0e57600080fd5b506106e960145481565b348015610e2457600080fd5b50610573610e33366004614fd6565b613410565b348015610e4457600080fd5b506109c7610e53366004614f58565b601f6020526000908152604090208054600182015460028301546003909301549192909184565b348015610e8657600080fd5b506106e9600b5481565b348015610e9c57600080fd5b50602654610626906001600160a01b031681565b61055c613493565b348015610ec457600080fd5b5061055c610ed3366004614fd6565b613548565b348015610ee457600080fd5b5061055c610ef3366004614fd6565b613946565b348015610f0457600080fd5b506106e96ec097ce7bc90715b34b9f100000000081565b348015610f2757600080fd5b50601354610527906301000000900460ff1681565b348015610f4857600080fd5b506106e9600e5481565b348015610f5e57600080fd5b50610527610f6d366004614f58565b60226020526000908152604090205460ff1681565b61055c610f903660046157a4565b6139d8565b348015610fa157600080fd5b50610527610fb036600461580e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610fea57600080fd5b506106e960185481565b34801561100057600080fd5b5061055c61100f366004614f58565b613b2b565b34801561102057600080fd5b50600a54610626906001600160a01b031681565b60006301ffc9a760e01b6001600160e01b03198316148061106557506380ac58cd60e01b6001600160e01b03198316145b806110805750635b5e139f60e01b6001600160e01b03198316145b92915050565b61108e613ba1565b6001600160a01b0381166110df5760405162461bcd60e51b81526020600482015260136024820152721e995c9bc81859191c995cdcc81c185cdcd959606a1b60448201526064015b60405180910390fd5b602580546001600160a01b038381166001600160a01b03198316179092556040519116907f2a57488c87619b8c17cdafd7d02db4daca22075796392e34fdab763a03dcbc2e9061113490849084904290615838565b60405180910390a15050565b60606002805461114f9061585c565b80601f016020809104026020016040519081016040528092919081815260200182805461117b9061585c565b80156111c85780601f1061119d576101008083540402835291602001916111c8565b820191906000526020600020905b8154815290600101906020018083116111ab57829003601f168201915b5050505050905090565b60006111dd82613bfb565b6111fa576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6024602052600090815260409020805481906112319061585c565b80601f016020809104026020016040519081016040528092919081815260200182805461125d9061585c565b80156112aa5780601f1061127f576101008083540402835291602001916112aa565b820191906000526020600020905b81548152906001019060200180831161128d57829003601f168201915b505050506001830154600284015460039094015492936001600160a01b039091169290915060ff1684565b6112dd613ba1565b600b805490829055604080518381526020810183905242918101919091527f6a210311c15e53c0bd9fa7790881b00bd2e71d686c9bfebb02b63dae0230080090606001611134565b61133182826001613c30565b5050565b601354339062010000900460ff166113855760405162461bcd60e51b815260206004820152601360248201527214d85b19481a5cc81b9bdd08115b98589b1959606a1b60448201526064016110d6565b600b5461139133613cd7565b61139b90876158ac565b11156113b95760405162461bcd60e51b81526004016110d6906158bf565b600c54856113c561158d565b6113cf91906158ac565b11156113ed5760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b031661140582878686613cff565b6001600160a01b03161461142b5760405162461bcd60e51b81526004016110d69061591b565b60008481526024602052604090206003015460ff1661145c5760405162461bcd60e51b81526004016110d690615947565b611467848487613d6c565b6114713386613ec9565b84600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a25050505050565b60006114af60015490565b905090565b6114bc613ba1565b805182511480156114ce575060008251115b6115085760405162461bcd60e51b815260206004820152600b60248201526a1ddc9bdb99c81a5b9c1d5d60aa1b60448201526064016110d6565b60005b8251811015611588578181815181106115265761152661597e565b6020026020010151602060008584815181106115445761154461597e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061158081615994565b91505061150b565b505050565b600154600054036000190190565b6115a3613ba1565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b601354610100900460ff166116185760405162461bcd60e51b8152602060048201526019602482015278135d5b1d1a4814d85b19481a5cc81b9bdd08115b98589b1959603a1b60448201526064016110d6565b600b5461162433613cd7565b61162e90846158ac565b111561164c5760405162461bcd60e51b81526004016110d6906158bf565b600c548261165861158d565b61166291906158ac565b11156116805760405162461bcd60e51b81526004016110d6906158eb565b60008181526024602052604090206003015460ff166116b15760405162461bcd60e51b81526004016110d690615947565b6000818152602460205260409020600201546116ce828285613d6c565b6116d83384613ec9565b82600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a2505050565b60165433906001600160a01b031661175c5760405162461bcd60e51b81526020600482015260166024820152751cdc1958da585b081b595d1a1bd9081b9bdd081cd95d60521b60448201526064016110d6565b6013546301000000900460ff166117b55760405162461bcd60e51b815260206004820152601b60248201527f5370656369616c2053616c65206973206e6f7420456e61626c6564000000000060448201526064016110d6565b600b546117c133613cd7565b6117cb90866158ac565b11156117e95760405162461bcd60e51b81526004016110d6906158bf565b600c54846117f561158d565b6117ff91906158ac565b111561181d5760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b031661183582868686613ee3565b6001600160a01b03161461185b5760405162461bcd60e51b81526004016110d69061591b565b806001600160a01b0316836001600160a01b0316036118aa5760405162461bcd60e51b815260206004820152600b60248201526a111bdb89dd0818da19585d60aa1b60448201526064016110d6565b60006064601854346118bc91906159ad565b6118c691906159c4565b905060006118d482346159e6565b90506118f16118eb6008546001600160a01b031690565b82613f18565b6118fb8583613f18565b6016546015546001600160a01b039091169060009061191b9089906159ad565b9050600060646018548361192f91906159ad565b61193991906159c4565b9050600061194782846159e6565b6040516323b872dd60e01b81529091506001600160a01b038516906323b872dd9061197a9033908d908790600401615838565b6020604051808303816000875af1158015611999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bd91906159f9565b611a025760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881d1bc81c99598819985a5b195960521b60448201526064016110d6565b836001600160a01b03166323b872dd33611a246008546001600160a01b031690565b846040518463ffffffff1660e01b8152600401611a4393929190615838565b6020604051808303816000875af1158015611a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8691906159f9565b611acd5760405162461bcd60e51b81526020600482015260186024820152771d1c985b9cd9995c881d1bc81bdddb995c8819985a5b195960421b60448201526064016110d6565b611ad7338b613ec9565b89600080516020615dc7833981519152336040516001600160a01b03909116815260200160405180910390a250505050505050505050565b6001600160a01b03831660009081526022602052604090205460ff1615611b485760405162461bcd60e51b81526004016110d690615a16565b6001600160a01b03831660009081526021602052604090205460ff1615611bb15760405162461bcd60e51b815260206004820152601d60248201527f756e6c6f636b20746f6b656e73206265666f7265207472616e7366657200000060448201526064016110d6565b60135460ff16611c28576001600160a01b0383161580611be857506001600160a01b038316600090815260208052604090205460ff165b611c285760405162461bcd60e51b81526020600482015260116024820152701d1c985b9cd9995c88191a5cd8589b1959607a1b60448201526064016110d6565b611588838383613fb1565b611c3b613ba1565b600f55565b611c48613ba1565b601d805460ff19811660ff90911615179055565b611c64613ba1565b600c548111611cc45760405162461bcd60e51b815260206004820152602660248201527f6e657720737570706c792063616e6e6f74206265206c657373207468616e20636044820152651d5c9c995b9d60d21b60648201526084016110d6565b600c805490829055604080518381526020810183905242918101919091527f708949a737b310dd5b3a011a4f5b1985f9ee4c69334aaa1613866e6f16f0334a90606001611134565b61158883838360405180602001604052806000815250612f82565b611d2f613ba1565b80518251148015611d41575060008251115b611d7b5760405162461bcd60e51b815260206004820152600b60248201526a1ddc9bdb99c81a5b9c1d5d60aa1b60448201526064016110d6565b60005b825181101561158857818181518110611d9957611d9961597e565b602002602001015160226000858481518110611db757611db761597e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580611df381615994565b915050611d7e565b611e0361414a565b611e0c336141a3565b611e166001600955565b565b611e20613ba1565b601d805462ff0000198116620100009182900460ff1615909102179055565b611e47613ba1565b6028611e538282615a89565b507f01eea250d558aa782ce24d87688c3b361432f2f932afefbf4f42fb8788b91b878142604051611e85929190615b48565b60405180910390a150565b6016546001600160a01b0316611ee15760405162461bcd60e51b81526020600482015260166024820152751cdc1958da585b081b595d1a1bd9081b9bdd081cd95d60521b60448201526064016110d6565b6013546301000000900460ff16611f3a5760405162461bcd60e51b815260206004820152601b60248201527f5370656369616c2053616c65206973206e6f7420456e61626c6564000000000060448201526064016110d6565b600b54611f4633613cd7565b611f5090836158ac565b1115611f6e5760405162461bcd60e51b81526004016110d6906158bf565b600c5481611f7a61158d565b611f8491906158ac565b1115611fa25760405162461bcd60e51b81526004016110d6906158eb565b80601454611fb091906159ad565b341015611ff55760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b99606a1b60448201526064016110d6565b61201061200a6008546001600160a01b031690565b34613f18565b6016546015546001600160a01b03909116906000906120309084906159ad565b9050816001600160a01b03166323b872dd336120546008546001600160a01b031690565b846040518463ffffffff1660e01b815260040161207393929190615838565b6020604051808303816000875af1158015612092573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b691906159f9565b6116ce5760405162461bcd60e51b81526004016110d690615b6a565b6120da613ba1565b600e55565b6060816000816001600160401b038111156120fc576120fc615053565b60405190808252806020026020018201604052801561214e57816020015b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161211a5790505b50905060005b8281146121a15761217c8686838181106121705761217061597e565b9050602002013561335e565b82828151811061218e5761218e61597e565b6020908102919091010152600101612154565b50949350505050565b6121b2613ba1565b6001600160a01b0383166121f75760405162461bcd60e51b815260206004820152600c60248201526b7a65726f206164647265737360a01b60448201526064016110d6565b601680546001600160a01b0319166001600160a01b039490941693909317909255601455601555565b6000611080826144b1565b602880546122389061585c565b80601f01602080910402602001604051908101604052809291908181526020018280546122649061585c565b80156122b15780601f10612286576101008083540402835291602001916122b1565b820191906000526020600020905b81548152906001019060200180831161229457829003601f168201915b505050505081565b6122c1613ba1565b602980546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b03821661230c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b612339613ba1565b611e16600061453d565b6001600160a01b03831660009081526022602052604090205460ff161561237c5760405162461bcd60e51b81526004016110d690615a16565b6001600160a01b03831660009081526021602052604090205460ff16156123e55760405162461bcd60e51b815260206004820152601d60248201527f756e6c6f636b20746f6b656e73206265666f7265207472616e7366657200000060448201526064016110d6565b60008151116124245760405162461bcd60e51b815260206004820152600b60248201526a656d70747920617272617960a81b60448201526064016110d6565b601754815161243391906159ad565b3410156124785760405162461bcd60e51b81526020600482015260136024820152721b9bdd08195b9bdd59da08195d1a081cd95b9d606a1b60448201526064016110d6565b60005b81518110156124ba576124a8848484848151811061249b5761249b61597e565b6020026020010151613fb1565b806124b281615994565b91505061247b565b5061158861200a6008546001600160a01b031690565b6124d8613ba1565b600091825260246020526040909120600301805460ff1916911515919091179055565b6000341161254b5760405162461bcd60e51b815260206004820152601c60248201527f76616c7565206d7573742062652067726561746572207468616e20300000000060448201526064016110d6565b601a5461256a5760405162461bcd60e51b81526004016110d690615b99565b601a546125866ec097ce7bc90715b34b9f1000000000346159ad565b61259091906159c4565b601b80546000906125a29084906158ac565b90915550506040805160018152346020820152428183015290517f68a3ded46bf5c11ca6b12cbb1e938f3981d6a4e96bba054e196a1657eb34a9319181900360600190a1565b606060008060006125f8856122e3565b90506000816001600160401b0381111561261457612614615053565b60405190808252806020026020018201604052801561263d578160200160208202803683370190505b50905061266a60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146126e45761267d8161458f565b915081604001516126dc5781516001600160a01b03161561269d57815194505b876001600160a01b0316856001600160a01b0316036126dc57808387806001019850815181106126cf576126cf61597e565b6020026020010181815250505b60010161266d565b50909695505050505050565b6001600160a01b0381166000908152601f60205260408120548190810361271c57506000928392509050565b6001600160a01b0383166000908152601f60205260408120600101548190612743906145cb565b6001600160a01b038716600090815260236020526040902080546001909101549294509092509081841180159061277a5750808311155b1561278e5750600096879650945050505050565b61279882856159e6565b6127a282856159e6565b9550955050505050915091565b6127b7613ba1565b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a0823190602401602060405180830381865afa1580156127fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128219190615be8565b101561286f5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742045524332302062616c616e636500000000000060448201526064016110d6565b816001600160a01b031663a9059cbb6128906008546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156128dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158891906159f9565b60606003805461114f9061585c565b612918613ba1565b601d805461ff001981166101009182900460ff1615909102179055565b606081831061295757604051631960ccad60e11b815260040160405180910390fd5b60008061296360005490565b9050600185101561297357600194505b8084111561297f578093505b600061298a876122e3565b9050848610156129a957858503818110156129a3578091505b506129ad565b5060005b6000816001600160401b038111156129c7576129c7615053565b6040519080825280602002602001820160405280156129f0578160200160208202803683370190505b50905081600003612a06579350612ab592505050565b6000612a118861335e565b905060008160400151612a22575080515b885b888114158015612a345750848714155b15612aa957612a428161458f565b92508260400151612aa15782516001600160a01b031615612a6257825191505b8a6001600160a01b0316826001600160a01b031603612aa15780848880600101995081518110612a9457612a9461597e565b6020026020010181815250505b600101612a24565b50505092835250909150505b9392505050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612b30613ba1565b600c5482612b3c61158d565b612b4691906158ac565b1115612b645760405162461bcd60e51b81526004016110d6906158eb565b612b6e818361462a565b6040516001600160a01b03821681528290600080516020615dc78339815191529060200160405180910390a25050565b612ba661414a565b601d54610100900460ff16612bfd5760405162461bcd60e51b815260206004820152601a60248201527f756e6c6f636b2074656d706f726172792073757370656e64656400000000000060448201526064016110d6565b3360009081526022602052604090205460ff1615612c2d5760405162461bcd60e51b81526004016110d690615a16565b600d54336000908152601f6020526040902060030154612c4d91906158ac565b421015612c8d5760405162461bcd60e51b815260206004820152600e60248201526d1b1bd8dac81b9bdd08195b99195960921b60448201526064016110d6565b336000908152601f60205260408120546019805491929091612cb09084906159e6565b9091555050336000908152601f6020526040812060010154601a805491929091612cdb9084906159e6565b909155506000905080612ced336126f0565b915091506000821180612d005750600081115b15612d0e57612d0e336141a3565b600a54336000818152601f6020908152604080832054815163a9059cbb60e01b815260048101959095526024850152516001600160a01b039094169363a9059cbb936044808201949183900301908290875af1158015612d72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9691906159f9565b612db25760405162461bcd60e51b81526004016110d690615b6a565b5050336000908152602160209081526040808320805460ff19169055601f9091528120818155600181810183905560028201839055600390910191909155600955565b612dfd613ba1565b604080516080810182528581526001600160a01b0385166020808301919091528183018590528315156060830152601254600090815260249091529190912081518190612e4a9082615a89565b5060208201516001820180546001600160a01b0319166001600160a01b03909216919091179055604082015160028201556060909101516003909101805460ff191691151591909117905560128054906000612ea583615994565b919050555050505050565b612eb8613ba1565b6013805463ffff0000191663010000009515159590950262ff000019169490941762010000931515939093029290921761ffff19166101009115159190910260ff191617901515179055565b612f0c613ba1565b6103e8811115612f4f5760405162461bcd60e51b815260206004820152600e60248201526d6d6f7265207468616e203130302560901b60448201526064016110d6565b602781905560405181907fce3498f3236889c7e9256b3643e0f7fae5a1b912f2ac0daa1d89236c70b522c690600090a250565b612f8d848484611b0f565b6001600160a01b0383163b15612fc657612fa984848484614728565b612fc6576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6013543390610100900460ff166130215760405162461bcd60e51b8152602060048201526019602482015278135d5b1d1a4814d85b19481a5cc81b9bdd08115b98589b1959603a1b60448201526064016110d6565b600b5461302d33613cd7565b61303790876158ac565b11156130555760405162461bcd60e51b81526004016110d6906158bf565b600c548561306161158d565b61306b91906158ac565b11156130895760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b03166130a182878686613ee3565b6001600160a01b0316146130c75760405162461bcd60e51b81526004016110d69061591b565b806001600160a01b0316836001600160a01b0316036131165760405162461bcd60e51b815260206004820152600b60248201526a111bdb89dd0818da19585d60aa1b60448201526064016110d6565b60008481526024602052604090206003015460ff166131475760405162461bcd60e51b81526004016110d690615947565b60008481526024602052604090206002015461316585828887614810565b613170335b87613ec9565b6001600160a01b0384166000908152601e6020526040812080548892906131989084906158ac565b90915550869050600080516020615dc7833981519152335b6040516001600160a01b03909116815260200160405180910390a2505050505050565b600081116132235760405162461bcd60e51b815260206004820152601c60248201527f76616c7565206d7573742062652067726561746572207468616e20300000000060448201526064016110d6565b601a546132425760405162461bcd60e51b81526004016110d690615b99565b600a546001600160a01b03166323b872dd3330846040518463ffffffff1660e01b815260040161327493929190615838565b6020604051808303816000875af1158015613293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132b791906159f9565b6132d35760405162461bcd60e51b81526004016110d690615b6a565b601a546132ef6ec097ce7bc90715b34b9f1000000000836159ad565b6132f991906159c4565b601c805460009061330b9084906158ac565b909155505060408051600081526020810183905242918101919091527f68a3ded46bf5c11ca6b12cbb1e938f3981d6a4e96bba054e196a1657eb34a93190606001611e85565b613359613ba1565b600d55565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806133b757506000548310155b156133c25792915050565b6133cb8361458f565b90508060400151156133dd5792915050565b612ab583614a9a565b6133ee613ba1565b602680546001600160a01b0319166001600160a01b0392909216919091179055565b606061341b82613bfb565b61345b5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016110d6565b613463614acf565b61346c83614ade565b60405160200161347d929190615c01565b6040516020818303038152906040529050919050565b61349b613ba1565b60006134af6008546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d80600081146134f9576040519150601f19603f3d011682016040523d82523d6000602084013e6134fe565b606091505b50509050806135455760405162461bcd60e51b8152602060048201526013602482015272195d1a081d1c985b9cd9995c8819985a5b1959606a1b60448201526064016110d6565b50565b601d54610100900460ff1661359f5760405162461bcd60e51b815260206004820152601860248201527f6c6f636b2074656d706f726172792073757370656e646564000000000000000060448201526064016110d6565b3360009081526022602052604090205460ff16156135cf5760405162461bcd60e51b81526004016110d690615a16565b60006135da336122e3565b9050600082116136205760405162461bcd60e51b81526020600482015260116024820152701e995c9bc8185b5bdd5b9d081a5b9c1d5d607a1b60448201526064016110d6565b600a546040805163313ce56760e01b815290516000926001600160a01b03169163313ce5679160048083019260209291908290030181865afa15801561366a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368e9190615c40565b61369990600a615d47565b6136a390846159ad565b600a546040516323b872dd60e01b81529192506001600160a01b0316906323b872dd906136d890339030908690600401615838565b6020604051808303816000875af11580156136f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061371b91906159f9565b6137375760405162461bcd60e51b81526004016110d690615b6a565b336000908152602160205260408120805460ff19166001179055601d5462010000900460ff161561379457600f54600e5461377290856159ad565b1161378957600e5461378490846159ad565b61378d565b600f545b9050613818565b600083116137d45760405162461bcd60e51b815260206004820152600d60248201526c06e66742062616c616e6365203609c1b60448201526064016110d6565b600f54600e546137e56001866159e6565b6137ef91906159ad565b1161381157600e546138026001856159e6565b61380c91906159ad565b613815565b600f545b90505b6000606461382683856159ad565b61383091906159c4565b61383a90846158ac565b9050826019600001600082825461385191906158ac565b9091555050601a805482919060009061386b9084906158ac565b9091555050336000908152601f60205260408120805485929061388f9084906158ac565b9091555050336000908152601f6020526040812060010180548392906138b69084906158ac565b9091555050336000908152601f6020526040902060028101859055426003820155600101546138e4906145cb565b336000818152602360209081526040918290206001810194909455939092558151908152918201859052818101849052517f7879fe07a34927cf93a00574a8c2e55740a44179eb359ed6850e486df16c52229181900360600190a15050505050565b61394e613ba1565b60648111156139905760405162461bcd60e51b815260206004820152600e60248201526d4d6f7265207468616e203130302560901b60448201526064016110d6565b6018805490829055604080518381526020810183905242918101919091527f05705bbfdb2ae341a1fb81bfbd5105e0330557e7cf96fdeeed6b9b7ef96e006a90606001611134565b601354339062010000900460ff16613a285760405162461bcd60e51b815260206004820152601360248201527214d85b19481a5cc81b9bdd08115b98589b1959606a1b60448201526064016110d6565b600b54613a3433613cd7565b613a3e90886158ac565b1115613a5c5760405162461bcd60e51b81526004016110d6906158bf565b600c5486613a6861158d565b613a7291906158ac565b1115613a905760405162461bcd60e51b81526004016110d6906158eb565b6029546001600160a01b0316613aa98288878787614b22565b6001600160a01b031614613acf5760405162461bcd60e51b81526004016110d69061591b565b60008581526024602052604090206003015460ff16613b005760405162461bcd60e51b81526004016110d690615947565b613b0c85858886614810565b613b153361316a565b85600080516020615dc7833981519152336131b0565b613b33613ba1565b6001600160a01b038116613b985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016110d6565b6135458161453d565b6008546001600160a01b03163314611e165760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016110d6565b600081600111158015613c0f575060005482105b8015611080575050600090815260046020526040902054600160e01b161590565b6000613c3b83612220565b90508115613c7a57336001600160a01b03821614613c7a57613c5d8133610fb0565b613c7a576040516367d9dca160e11b815260040160405180910390fd5b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6001600160a01b03166000908152600560205260409081902054901c6001600160401b031690565b6040516001600160601b0319606086901b166020820152603481018490526054810183905260009081906074015b6040516020818303038152906040528051906020012090506000613d5082614b97565b90506000613d5e8286614bea565b93505050505b949350505050565b82600003613dd857613d7e81836159ad565b341015613dc35760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b99606a1b60448201526064016110d6565b61158861200a6008546001600160a01b031690565b6000838152602460205260408120600101546001600160a01b031690613dfe83856159ad565b9050816001600160a01b03166323b872dd33613e226008546001600160a01b031690565b846040518463ffffffff1660e01b8152600401613e4193929190615838565b6020604051808303816000875af1158015613e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e8491906159f9565b613ec25760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b60448201526064016110d6565b5050505050565b611331828260405180602001604052806000815250614c0e565b6040516001600160601b0319606086811b821660208401526034830186905284901b1660548201526000908190606801613d2d565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613f65576040519150601f19603f3d011682016040523d82523d6000602084013e613f6a565b606091505b50509050806115885760405162461bcd60e51b8152602060048201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b60448201526064016110d6565b6000613fbc826144b1565b9050836001600160a01b0316816001600160a01b031614613fef5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b0388169091141761403c5761401f8633610fb0565b61403c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661406357604051633a954ecd60e21b815260040160405180910390fd5b801561406e57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003614100576001840160008181526004602052604081205490036140fe5760005481146140fe5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60026009540361419c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016110d6565b6002600955565b6001600160a01b038116600090815260236020526040902060020154421161420d5760405162461bcd60e51b815260206004820152601d60248201527f63616e206f6e6c7920636c61696d206f6e63652070657220626c6f636b00000060448201526064016110d6565b6001600160a01b03811660009081526022602052604090205460ff16156142465760405162461bcd60e51b81526004016110d690615a16565b601d5460ff166142985760405162461bcd60e51b815260206004820152601860248201527f636c61696d2074656d706f726172792064697361626c6564000000000000000060448201526064016110d6565b6001600160a01b0381166000908152601f60205260409020546142f05760405162461bcd60e51b815260206004820152601060248201526f1b9bc81d1bdad95b9cc81cdd185ad95960821b60448201526064016110d6565b6000806142fc836126f0565b91509150600082118061430f5750600081115b61434e5760405162461bcd60e51b815260206004820152601060248201526f6e6f7468696e6720746f20636c61696d60801b60448201526064016110d6565b81156143b457816010600082825461436691906158ac565b90915550506001600160a01b0383166000908152601f6020526040902060010154614390906145cb565b506001600160a01b0384166000908152602360205260409020556143b48383613f18565b801561448f5780601160008282546143cc91906158ac565b90915550506001600160a01b0383166000908152601f60205260409020600101546143f6906145cb565b6001600160a01b038581166000818152602360205260409081902060010193909355600a54925163a9059cbb60e01b81526004810191909152602481018590529116915063a9059cbb906044016020604051808303816000875af1158015614462573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061448691906159f9565b61448f57600080fd5b50506001600160a01b0316600090815260236020526040902042600290910155565b600081600111614524575060008181526004602052604081205490600160e01b82169003614524578060000361451f57600054821061450357604051636f96cda160e11b815260040160405180910390fd5b5b50600019016000818152600460205260409020548015614504575b919050565b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461108090614c74565b6000806ec097ce7bc90715b34b9f1000000000601960020154846145ef91906159ad565b6145f991906159c4565b601c546ec097ce7bc90715b34b9f10000000009061461790866159ad565b61462191906159c4565b91509150915091565b600080549082900361464f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146146fe57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016146c6565b508160000361471f57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061475d903390899088908890600401615d56565b6020604051808303816000875af1925050508015614798575060408051601f3d908101601f1916820190925261479591810190615d93565b60015b6147f6573d8080156147c6576040519150601f19603f3d011682016040523d82523d6000602084013e6147cb565b606091505b5080516000036147ee576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613d64565b836000036148b95761482282846159ad565b3410156148675760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b60448201526064016110d6565b600060646018543461487991906159ad565b61488391906159c4565b9050600061489182346159e6565b90506148a86118eb6008546001600160a01b031690565b6148b28383613f18565b5050612fc6565b6000848152602460205260408120600101546001600160a01b0316906148df84866159ad565b905060006064601854836148f391906159ad565b6148fd91906159c4565b9050600061490b82846159e6565b9050836001600160a01b03166323b872dd3361492f6008546001600160a01b031690565b846040518463ffffffff1660e01b815260040161494e93929190615838565b6020604051808303816000875af115801561496d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061499191906159f9565b6149d85760405162461bcd60e51b81526020600482015260186024820152771d1c985b9cd9995c881d1bc81bdddb995c8819985a5b195960421b60448201526064016110d6565b6040516323b872dd60e01b81526001600160a01b038516906323b872dd90614a0890339089908790600401615838565b6020604051808303816000875af1158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b91906159f9565b614a905760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881d1bc81c99598819985a5b195960521b60448201526064016110d6565b5050505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152611080614aca836144b1565b614c74565b60606028805461114f9061585c565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480614af85750819003601f19909101908152919050565b6040516001600160601b0319606087811b82166020840152603483018790526054830186905284901b16607482015260009081906088016040516020818303038152906040528051906020012090506000614b7c82614b97565b90506000614b8a8286614bea565b9998505050505050505050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000614bf98585614cbb565b91509150614c0681614d00565b509392505050565b614c18838361462a565b6001600160a01b0383163b15611588576000548281035b614c426000868380600101945086614728565b614c5f576040516368d2bf6b60e11b815260040160405180910390fd5b818110614c2f578160005414613ec257600080fd5b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6000808251604103614cf15760208301516040840151606085015160001a614ce587828585614e4a565b94509450505050614cf9565b506000905060025b9250929050565b6000816004811115614d1457614d14615db0565b03614d1c5750565b6001816004811115614d3057614d30615db0565b03614d7d5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016110d6565b6002816004811115614d9157614d91615db0565b03614dde5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016110d6565b6003816004811115614df257614df2615db0565b036135455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016110d6565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614e815750600090506003614f05565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614ed5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614efe57600060019250925050614f05565b9150600090505b94509492505050565b6001600160e01b03198116811461354557600080fd5b600060208284031215614f3657600080fd5b8135612ab581614f0e565b80356001600160a01b038116811461451f57600080fd5b600060208284031215614f6a57600080fd5b612ab582614f41565b60005b83811015614f8e578181015183820152602001614f76565b50506000910152565b60008151808452614faf816020860160208601614f73565b601f01601f19169290920160200192915050565b602081526000612ab56020830184614f97565b600060208284031215614fe857600080fd5b5035919050565b6080815260006150026080830187614f97565b6001600160a01b039590951660208301525060408101929092521515606090910152919050565b6000806040838503121561503c57600080fd5b61504583614f41565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561509157615091615053565b604052919050565b600082601f8301126150aa57600080fd5b81356001600160401b038111156150c3576150c3615053565b6150d6601f8201601f1916602001615069565b8181528460208386010111156150eb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561511e57600080fd5b84359350602085013592506040850135915060608501356001600160401b0381111561514957600080fd5b61515587828801615099565b91505092959194509250565b60006001600160401b0382111561517a5761517a615053565b5060051b60200190565b801515811461354557600080fd5b600082601f8301126151a357600080fd5b813560206151b86151b383615161565b615069565b82815260059290921b840181019181810190868411156151d757600080fd5b8286015b848110156151fb5780356151ee81615184565b83529183019183016151db565b509695505050505050565b6000806040838503121561521957600080fd5b82356001600160401b038082111561523057600080fd5b818501915085601f83011261524457600080fd5b813560206152546151b383615161565b82815260059290921b8401810191818101908984111561527357600080fd5b948201945b838610156152985761528986614f41565b82529482019490820190615278565b965050860135925050808211156152ae57600080fd5b506152bb85828601615192565b9150509250929050565b600080604083850312156152d857600080fd5b50508035926020909101359150565b6000806000606084860312156152fc57600080fd5b8335925061530c60208501614f41565b915060408401356001600160401b0381111561532757600080fd5b61533386828701615099565b9150509250925092565b60008060006060848603121561535257600080fd5b61535b84614f41565b925061536960208501614f41565b9150604084013590509250925092565b60006020828403121561538b57600080fd5b81356001600160401b038111156153a157600080fd5b613d6484828501615099565b600080602083850312156153c057600080fd5b82356001600160401b03808211156153d757600080fd5b818501915085601f8301126153eb57600080fd5b8135818111156153fa57600080fd5b8660208260051b850101111561540f57600080fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156126e45761548c838551615421565b9284019260809290920191600101615479565b6000806000606084860312156154b457600080fd5b6154bd84614f41565b95602085013595506040909401359392505050565b6000806000606084860312156154e757600080fd5b6154f084614f41565b925060206154ff818601614f41565b925060408501356001600160401b0381111561551a57600080fd5b8501601f8101871361552b57600080fd5b80356155396151b382615161565b81815260059190911b8201830190838101908983111561555857600080fd5b928401925b828410156155765783358252928401929084019061555d565b80955050505050509250925092565b6000806040838503121561559857600080fd5b8235915060208301356155aa81615184565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156126e4578351835292840192918401916001016155d1565b6000806040838503121561560057600080fd5b61560983614f41565b915060208301356155aa81615184565b6000806040838503121561562c57600080fd5b8235915061563c60208401614f41565b90509250929050565b6000806000806080858703121561565b57600080fd5b84356001600160401b0381111561567157600080fd5b61567d87828801615099565b94505061568c60208601614f41565b92506040850135915060608501356156a381615184565b939692955090935050565b600080600080608085870312156156c457600080fd5b84356156cf81615184565b935060208501356156df81615184565b925060408501356156ef81615184565b915060608501356156a381615184565b6000806000806080858703121561571557600080fd5b61571e85614f41565b935061572c60208601614f41565b92506040850135915060608501356001600160401b0381111561514957600080fd5b6000806000806080858703121561576457600080fd5b843593506020850135925061577b60408601614f41565b915060608501356001600160401b0381111561514957600080fd5b608081016110808284615421565b600080600080600060a086880312156157bc57600080fd5b8535945060208601359350604086013592506157da60608701614f41565b915060808601356001600160401b038111156157f557600080fd5b61580188828901615099565b9150509295509295909350565b6000806040838503121561582157600080fd5b61582a83614f41565b915061563c60208401614f41565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600181811c9082168061587057607f821691505b60208210810361589057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561108057611080615896565b602080825260129082015271115e18d959591959081d1a19481b1a5b5a5d60721b604082015260600190565b602080825260169082015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b604082015260600190565b6020808252601290820152711150d114d04818da1958dac819985a5b195960721b604082015260600190565b6020808252601f908201527f54686973207061796d656e74206d6574686f642069732064697361626c656400604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600182016159a6576159a6615896565b5060010190565b808202811582820484141761108057611080615896565b6000826159e157634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561108057611080615896565b600060208284031215615a0b57600080fd5b8151612ab581615184565b6020808252601390820152721e5bdd48185c9948189b1858dadb1a5cdd1959606a1b604082015260600190565b601f82111561158857600081815260208120601f850160051c81016020861015615a6a5750805b601f850160051c820191505b8181101561414257828155600101615a76565b81516001600160401b03811115615aa257615aa2615053565b615ab681615ab0845461585c565b84615a43565b602080601f831160018114615aeb5760008415615ad35750858301515b600019600386901b1c1916600185901b178555614142565b600085815260208120601f198616915b82811015615b1a57888601518255948401946001909101908401615afb565b5085821015615b385787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000615b5b6040830185614f97565b90508260208301529392505050565b6020808252601590820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b604082015260600190565b6020808252602f908201527f6d75737420626520736861726573206465706f736974656420746f206265207260408201526e65776172646564207265776172647360881b606082015260800190565b600060208284031215615bfa57600080fd5b5051919050565b60008351615c13818460208801614f73565b835190830190615c27818360208801614f73565b64173539b7b760d91b9101908152600501949350505050565b600060208284031215615c5257600080fd5b815160ff81168114612ab557600080fd5b600181815b80851115615c9e578160001904821115615c8457615c84615896565b80851615615c9157918102915b93841c9390800290615c68565b509250929050565b600082615cb557506001611080565b81615cc257506000611080565b8160018114615cd85760028114615ce257615cfe565b6001915050611080565b60ff841115615cf357615cf3615896565b50506001821b611080565b5060208310610133831016604e8410600b8410161715615d21575081810a611080565b615d2b8383615c63565b8060001904821115615d3f57615d3f615896565b029392505050565b6000612ab560ff841683615ca6565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615d8990830184614f97565b9695505050505050565b600060208284031215615da557600080fd5b8151612ab581614f0e565b634e487b7160e01b600052602160045260246000fdfeb069a28fab2f4a275fc364c15d220c5884271a144db6d116d13dcb79c8181c6ca2646970667358221220e73caceafd0fa60db92ba077c7ebd09c2940bd3129dcc64c6b46c4d19c0ce1d664736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.