Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Yugen
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* * Yugen.sol * * Created: October 25, 2023 */ pragma solidity ^0.8.4; import "./Satoshigoat.sol"; import "./utils/DateTime.sol"; /* NOTES: - 3 total states: last day of the century, first 9 months of new century, other - 1/1 NFT collection (3 versions exist) - Centuries rollover on October 25 */ //@title Century - Yugen //@author Jack Kasbeer (satoshigoat) (gh:@jcksber) contract Yugen is Satoshigoat { uint256 public cycleStartTime = 1698192000;//October 25, 2023 (midnight) //red: [0,9], black: [10], gold: [11] string [12] private _hashes = ["QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-1.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-2.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-3.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-4.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-5.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-6.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-7.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-8.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-9.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/red2-10.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/black2.json", "QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/gold2.json"]; // ------------------------------ // CORE FUNCTIONALITY FOR ERC-721 // ------------------------------ constructor() Satoshigoat("Yugen", "", "ipfs://") { _contractURI = "ipfs://QmWtxuzrNa2j3SmUeWjXzkNWWibeUx3mPCpiCT26ufri2w/century2-contract.json"; _owner = address(0xF1c2eC71b6547d0b30D23f29B9a0e8f76C7Af743); payoutAddress = address(0xF1c2eC71b6547d0b30D23f29B9a0e8f76C7Af743); purchasePrice = 3.1 ether;//~$6k @ launch maxNumTokens = 1; } //@dev See {ERC721A-tokenURI} function tokenURI(uint256 tid) public view virtual override returns (string memory) { if (!_exists(tid)) revert URIQueryForNonexistentToken(); return string(abi.encodePacked(_baseURI(), _getIPFSHash())); } //@dev Get the appropriate IPFS hash based on the day function _getIPFSHash() private view returns (string memory) { // SETUP VARIABLES FOR TIME MANIPULATION uint newCycleStartTime = cycleStartTime;//will only change if a century or more has passed uint256 today = block.timestamp; uint256 thisYear = DateTime.getYear(today); uint256 startYear = DateTime.getYear(cycleStartTime);//og start date uint trueDeltaYears = thisYear - startYear; // The modified delta years are to ensure we use [0,100] when doing time math uint modDeltaYears = isHundredMultiple(trueDeltaYears) ? uint(100) : (trueDeltaYears % 100); // If it has been more than a century we need to add hundred(s) of years to our original cycle start: // SIMULATE updating the global variable `cycleStartTime` (which is not possible in this function); // this simulated variable is `newCycleStartTime` if (trueDeltaYears >= 100) { uint numHundreds = trueDeltaYears / uint(100); if (isHundredMultiple(trueDeltaYears) && isBeforeCenturyTurn(today)) newCycleStartTime = DateTime.addYears(cycleStartTime, (numHundreds-1)*100); else newCycleStartTime = DateTime.addYears(cycleStartTime, numHundreds*100); } // DETERMINE WHICH STATE THE ART IS IN AND RETURN THE CORRESPONDING HASH // FIRST 99 YEARS OF THE CENTURY: // Red zone hashes & gold hash: if we are still in the first cycle the gold // state is ignored and only red hashes are used; otw, the first 9 months of // a new cycle will be in a gold state uint i; for (i = 1; i <= 9; i++) { if (i == 1) { // Is it the beginning of the century? if (trueDeltaYears > 100 || (isHundredMultiple(trueDeltaYears) && !isBeforeCenturyTurn(today))) { //today is either October 25th, 2023 + C*100, or between October 25th and December 31st if (newCycleStartTime <= today) { if (DateTime.diffDays(newCycleStartTime, today) <= 274) { return _hashes[11]; } } } } // This covers the first 90 years for the first century // or the next 89 years and 3 months if it has been more than 100 years if (modDeltaYears <= 10*i) { // Edge cases: 10 year difference, but January 1st <= today <= October 24th if (modDeltaYears == 10*i) { if (isBeforeCenturyTurn(today)) return _hashes[i-1];//red states 1 thru 9 else return _hashes[i];//red states 2 thru 10 (edge cases for decades) 4853960271 } return _hashes[i-1];//red states 1 thru 9 } } // This covers the first 9 years of final red state (10) if (modDeltaYears <= 99) return _hashes[9]; /* * assert(modDeltaYears == 100) which => the new century approaches (we are in the final 91.25 days) * assert(diffDays(block.timestamp, addYears(newCycleStartTime, 100)) != 0) * ^ this case is covered in the for loop above */ // LAST YEAR OF THE CENTURY: // January 1 thru October 23 is still in the final red state; only October 24 is the black state. // If we are stil in the final red state the number of days between now and the turn of the next century // will be greater than 1; otw, it's the last day of the century and the state is black. uint nextCenturyStart = DateTime.addYears(newCycleStartTime, 100); uint numDaysToNextCentury = DateTime.diffDays(today, nextCenturyStart); if (numDaysToNextCentury <= 1) return _hashes[10]; else return _hashes[9]; } //@dev Helper function to determine if the date is between January 1 and October 24 function isBeforeCenturyTurn(uint256 today) internal pure returns (bool) { uint256 thisMonth = DateTime.getMonth(today);//todays month uint256 thisDay = DateTime.getDay(today);//todays day if (thisMonth < 10 || (thisMonth == 10 && thisDay < 25)) return true; else return false; } //@dev Helper function to determine if a number is a multiple of 100 function isHundredMultiple(uint256 x) internal pure returns (bool) { return x % 100 == 0 && x != 0; } //@dev Mint a token (owners only) function mint(address payable to) external isSquad nonReentrant enoughSupply(1) notContract(to) { _safeMint(to, 1); } //@dev Purchase a token function purchase() external payable isPublic nonReentrant enoughSupply(1) enoughEther(msg.value) { _safeMint(_msgSender(), 1); } // ---------------- // BACKUP FUNCTIONS // ---------------- //@dev [BACKUP METHOD] Change one of the ipfs hashes for the project function setIPFSHash(uint8 idx, string memory newHash) external isSquad { if (idx < 0 || idx > 11) revert DataError("index out of bounds"); if (_stringsEqual(_hashes[idx], newHash)) revert DataError("hash is the same"); _hashes[idx] = newHash; } //@dev [BACKUP METHOD] No clue why this would be needed but it's here lol function setCycleStartTime(uint256 newStartTime) external isSquad { if (cycleStartTime == newStartTime) revert DataError("new time is the same as old time"); cycleStartTime = newStartTime; } //@dev [BACKUP METHOD] Allow squad to burn any token function burn(uint256 tid) external isSquad { _burn(tid); } //@dev [BACKUP METHOD] Destroy contract and reclaim leftover funds function kill() external onlyOwner { selfdestruct(payable(_msgSender())); } //@dev [BACKUP METHOD] See `kill`; protects against being unable to delete a collection on OpenSea function safe_kill() external onlyOwner { if (balanceOf(_msgSender()) != totalSupply()) revert DataError("potential error - not all tokens owned"); selfdestruct(payable(_msgSender())); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721A.sol"; import "./utils/ReentrancyGuard.sol"; import "./access/SquadOwnable.sol"; error DataError(string msg); contract Satoshigoat is ERC721A, SquadOwnable, ReentrancyGuard { //@dev Sale Data uint256 public maxNumTokens;//*set in parent uint256 constant public royaltyFeeBps = 1000;//10% bool public isPublicSale;//*set in parent if not initially false //@dev Properties string internal _contractURI;//*set in parent string internal _baseTokenURI;//*passed thru parent constructor address public payoutAddress;//*set in parent address public _owner;//*set in parent uint256 public purchasePrice;//*set in parent // ----------- // RESTRICTORS // ----------- modifier isPublic() { if (!isPublicSale) revert DataError("sale is still private"); _; } modifier onlyValidTokenID(uint256 tid) { if (tid >= maxNumTokens) revert DataError("tid OOB"); _; } modifier notEqual(string memory str1, string memory str2) { if(_stringsEqual(str1, str2)) revert DataError("strings must be different"); _; } modifier enoughSupply(uint256 qty) { if (totalSupply() == maxNumTokens) revert DataError("not enough left"); _; } modifier enoughEther(uint256 amount) { if (amount < purchasePrice) revert DataError("insufficient funds"); _; } modifier notContract(address to) { if (_isContract(to)) revert DataError("silly rabbit :P"); _; } // ---- // CORE // ---- constructor( string memory name_, string memory symbol_, string memory baseTokenURI ) ERC721A(name_, symbol_) { _baseTokenURI = baseTokenURI; _contractURI = ""; } //@dev See {ERC721A-_baseURI} function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } //@dev Controls the contract-level metadata function contractURI() external view returns (string memory) { return _contractURI; } //@dev Allows us to withdraw funds collected function withdraw(address payable wallet, uint256 amount) external isSquad nonReentrant { if (amount > address(this).balance) revert DataError("insufficient funds to withdraw"); wallet.transfer(amount); } //@dev Ability to change _baseTokenURI function setBaseTokenURI(string calldata newBaseURI) external isSquad notEqual(_baseTokenURI, newBaseURI) { _baseTokenURI = newBaseURI; } //@dev Ability to change the contract URI function setContractURI(string calldata newContractURI) external isSquad notEqual(_contractURI, newContractURI) { _contractURI = newContractURI; } //@dev Ability to change the purchase/mint price function setPurchasePrice(uint256 newPriceInWei) external isSquad { if (purchasePrice == newPriceInWei) revert DataError("prices can't be the same"); purchasePrice = newPriceInWei; } //@dev Toggle the status of the sale (public/private) function toggleIsPublicSale() external isSquad { isPublicSale = !isPublicSale; } // ------- // HELPERS // ------- //@dev Determine if two strings are equal using the length + hash method function _stringsEqual(string memory a, string memory b) internal pure returns (bool) { bytes memory A = bytes(a); bytes memory B = bytes(b); if (A.length != B.length) return false; else return keccak256(A) == keccak256(B); } //@dev Determine if an address is a smart contract function _isContract(address a) internal view returns (bool) { // This method relies on `extcodesize`, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint32 size; assembly { size := extcodesize(a) } return size > 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // ---------------------------------------------------------------------------- // DateTime Library v2.0 // // A gas-efficient Solidity date and time library // // https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary // // Tested date range 1970/01/01 to 2345/12/31 // // Conventions: // Unit | Range | Notes // :-------- |:-------------:|:----- // timestamp | >= 0 | Unix timestamp, number of seconds since 1970/01/01 00:00:00 UTC // year | 1970 ... 2345 | // month | 1 ... 12 | // day | 1 ... 31 | // hour | 0 ... 23 | // minute | 0 ... 59 | // second | 0 ... 59 | // dayOfWeek | 1 ... 7 | 1 = Monday, ..., 7 = Sunday // // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018-2019. The MIT Licence. // ---------------------------------------------------------------------------- library DateTime { uint256 constant SECONDS_PER_DAY = 24 * 60 * 60; uint256 constant SECONDS_PER_HOUR = 60 * 60; uint256 constant SECONDS_PER_MINUTE = 60; int256 constant OFFSET19700101 = 2440588; uint256 constant DOW_MON = 1; uint256 constant DOW_TUE = 2; uint256 constant DOW_WED = 3; uint256 constant DOW_THU = 4; uint256 constant DOW_FRI = 5; uint256 constant DOW_SAT = 6; uint256 constant DOW_SUN = 7; // ------------------------------------------------------------------------ // Calculate the number of days from 1970/01/01 to year/month/day using // the date conversion algorithm from // http://aa.usno.navy.mil/faq/docs/JD_Formula.php // and subtracting the offset 2440588 so that 1970/01/01 is day 0 // // days = day // - 32075 // + 1461 * (year + 4800 + (month - 14) / 12) / 4 // + 367 * (month - 2 - (month - 14) / 12 * 12) / 12 // - 3 * ((year + 4900 + (month - 14) / 12) / 100) / 4 // - offset // ------------------------------------------------------------------------ function _daysFromDate(uint256 year, uint256 month, uint256 day) internal pure returns (uint256 _days) { require(year >= 1970); int256 _year = int256(year); int256 _month = int256(month); int256 _day = int256(day); int256 __days = _day - 32075 + (1461 * (_year + 4800 + (_month - 14) / 12)) / 4 + (367 * (_month - 2 - ((_month - 14) / 12) * 12)) / 12 - (3 * ((_year + 4900 + (_month - 14) / 12) / 100)) / 4 - OFFSET19700101; _days = uint256(__days); } // ------------------------------------------------------------------------ // Calculate year/month/day from the number of days since 1970/01/01 using // the date conversion algorithm from // http://aa.usno.navy.mil/faq/docs/JD_Formula.php // and adding the offset 2440588 so that 1970/01/01 is day 0 // // int L = days + 68569 + offset // int N = 4 * L / 146097 // L = L - (146097 * N + 3) / 4 // year = 4000 * (L + 1) / 1461001 // L = L - 1461 * year / 4 + 31 // month = 80 * L / 2447 // dd = L - 2447 * month / 80 // L = month / 11 // month = month + 2 - 12 * L // year = 100 * (N - 49) + year + L // ------------------------------------------------------------------------ function _daysToDate(uint256 _days) internal pure returns (uint256 year, uint256 month, uint256 day) { unchecked { int256 __days = int256(_days); int256 L = __days + 68569 + OFFSET19700101; int256 N = (4 * L) / 146097; L = L - (146097 * N + 3) / 4; int256 _year = (4000 * (L + 1)) / 1461001; L = L - (1461 * _year) / 4 + 31; int256 _month = (80 * L) / 2447; int256 _day = L - (2447 * _month) / 80; L = _month / 11; _month = _month + 2 - 12 * L; _year = 100 * (N - 49) + _year + L; year = uint256(_year); month = uint256(_month); day = uint256(_day); } } function timestampFromDate(uint256 year, uint256 month, uint256 day) internal pure returns (uint256 timestamp) { timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY; } function timestampFromDateTime( uint256 year, uint256 month, uint256 day, uint256 hour, uint256 minute, uint256 second ) internal pure returns (uint256 timestamp) { timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + hour * SECONDS_PER_HOUR + minute * SECONDS_PER_MINUTE + second; } function timestampToDate(uint256 timestamp) internal pure returns (uint256 year, uint256 month, uint256 day) { unchecked { (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY); } } function timestampToDateTime(uint256 timestamp) internal pure returns (uint256 year, uint256 month, uint256 day, uint256 hour, uint256 minute, uint256 second) { unchecked { (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY); uint256 secs = timestamp % SECONDS_PER_DAY; hour = secs / SECONDS_PER_HOUR; secs = secs % SECONDS_PER_HOUR; minute = secs / SECONDS_PER_MINUTE; second = secs % SECONDS_PER_MINUTE; } } function isValidDate(uint256 year, uint256 month, uint256 day) internal pure returns (bool valid) { if (year >= 1970 && month > 0 && month <= 12) { uint256 daysInMonth = _getDaysInMonth(year, month); if (day > 0 && day <= daysInMonth) { valid = true; } } } function isValidDateTime(uint256 year, uint256 month, uint256 day, uint256 hour, uint256 minute, uint256 second) internal pure returns (bool valid) { if (isValidDate(year, month, day)) { if (hour < 24 && minute < 60 && second < 60) { valid = true; } } } function isLeapYear(uint256 timestamp) internal pure returns (bool leapYear) { (uint256 year,,) = _daysToDate(timestamp / SECONDS_PER_DAY); leapYear = _isLeapYear(year); } function _isLeapYear(uint256 year) internal pure returns (bool leapYear) { leapYear = ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0); } function isWeekDay(uint256 timestamp) internal pure returns (bool weekDay) { weekDay = getDayOfWeek(timestamp) <= DOW_FRI; } function isWeekEnd(uint256 timestamp) internal pure returns (bool weekEnd) { weekEnd = getDayOfWeek(timestamp) >= DOW_SAT; } function getDaysInMonth(uint256 timestamp) internal pure returns (uint256 daysInMonth) { (uint256 year, uint256 month,) = _daysToDate(timestamp / SECONDS_PER_DAY); daysInMonth = _getDaysInMonth(year, month); } function _getDaysInMonth(uint256 year, uint256 month) internal pure returns (uint256 daysInMonth) { if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) { daysInMonth = 31; } else if (month != 2) { daysInMonth = 30; } else { daysInMonth = _isLeapYear(year) ? 29 : 28; } } // 1 = Monday, 7 = Sunday function getDayOfWeek(uint256 timestamp) internal pure returns (uint256 dayOfWeek) { uint256 _days = timestamp / SECONDS_PER_DAY; dayOfWeek = ((_days + 3) % 7) + 1; } function getYear(uint256 timestamp) internal pure returns (uint256 year) { (year,,) = _daysToDate(timestamp / SECONDS_PER_DAY); } function getMonth(uint256 timestamp) internal pure returns (uint256 month) { (, month,) = _daysToDate(timestamp / SECONDS_PER_DAY); } function getDay(uint256 timestamp) internal pure returns (uint256 day) { (,, day) = _daysToDate(timestamp / SECONDS_PER_DAY); } function getHour(uint256 timestamp) internal pure returns (uint256 hour) { uint256 secs = timestamp % SECONDS_PER_DAY; hour = secs / SECONDS_PER_HOUR; } function getMinute(uint256 timestamp) internal pure returns (uint256 minute) { uint256 secs = timestamp % SECONDS_PER_HOUR; minute = secs / SECONDS_PER_MINUTE; } function getSecond(uint256 timestamp) internal pure returns (uint256 second) { second = timestamp % SECONDS_PER_MINUTE; } function addYears(uint256 timestamp, uint256 _years) internal pure returns (uint256 newTimestamp) { (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY); year += _years; uint256 daysInMonth = _getDaysInMonth(year, month); if (day > daysInMonth) { day = daysInMonth; } newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY); require(newTimestamp >= timestamp); } function addMonths(uint256 timestamp, uint256 _months) internal pure returns (uint256 newTimestamp) { (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY); month += _months; year += (month - 1) / 12; month = ((month - 1) % 12) + 1; uint256 daysInMonth = _getDaysInMonth(year, month); if (day > daysInMonth) { day = daysInMonth; } newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY); require(newTimestamp >= timestamp); } function addDays(uint256 timestamp, uint256 _days) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp + _days * SECONDS_PER_DAY; require(newTimestamp >= timestamp); } function addHours(uint256 timestamp, uint256 _hours) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp + _hours * SECONDS_PER_HOUR; require(newTimestamp >= timestamp); } function addMinutes(uint256 timestamp, uint256 _minutes) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp + _minutes * SECONDS_PER_MINUTE; require(newTimestamp >= timestamp); } function addSeconds(uint256 timestamp, uint256 _seconds) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp + _seconds; require(newTimestamp >= timestamp); } function subYears(uint256 timestamp, uint256 _years) internal pure returns (uint256 newTimestamp) { (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY); year -= _years; uint256 daysInMonth = _getDaysInMonth(year, month); if (day > daysInMonth) { day = daysInMonth; } newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY); require(newTimestamp <= timestamp); } function subMonths(uint256 timestamp, uint256 _months) internal pure returns (uint256 newTimestamp) { (uint256 year, uint256 month, uint256 day) = _daysToDate(timestamp / SECONDS_PER_DAY); uint256 yearMonth = year * 12 + (month - 1) - _months; year = yearMonth / 12; month = (yearMonth % 12) + 1; uint256 daysInMonth = _getDaysInMonth(year, month); if (day > daysInMonth) { day = daysInMonth; } newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + (timestamp % SECONDS_PER_DAY); require(newTimestamp <= timestamp); } function subDays(uint256 timestamp, uint256 _days) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp - _days * SECONDS_PER_DAY; require(newTimestamp <= timestamp); } function subHours(uint256 timestamp, uint256 _hours) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp - _hours * SECONDS_PER_HOUR; require(newTimestamp <= timestamp); } function subMinutes(uint256 timestamp, uint256 _minutes) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp - _minutes * SECONDS_PER_MINUTE; require(newTimestamp <= timestamp); } function subSeconds(uint256 timestamp, uint256 _seconds) internal pure returns (uint256 newTimestamp) { newTimestamp = timestamp - _seconds; require(newTimestamp <= timestamp); } function diffYears(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _years) { require(fromTimestamp <= toTimestamp); (uint256 fromYear,,) = _daysToDate(fromTimestamp / SECONDS_PER_DAY); (uint256 toYear,,) = _daysToDate(toTimestamp / SECONDS_PER_DAY); _years = toYear - fromYear; } function diffMonths(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _months) { require(fromTimestamp <= toTimestamp); (uint256 fromYear, uint256 fromMonth,) = _daysToDate(fromTimestamp / SECONDS_PER_DAY); (uint256 toYear, uint256 toMonth,) = _daysToDate(toTimestamp / SECONDS_PER_DAY); _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth; } function diffDays(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _days) { require(fromTimestamp <= toTimestamp); _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY; } function diffHours(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _hours) { require(fromTimestamp <= toTimestamp); _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR; } function diffMinutes(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _minutes) { require(fromTimestamp <= toTimestamp); _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE; } function diffSeconds(uint256 fromTimestamp, uint256 toTimestamp) internal pure returns (uint256 _seconds) { require(fromTimestamp <= toTimestamp); _seconds = toTimestamp - fromTimestamp; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _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 _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is 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 { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT 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 make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT /* * SquadOwnable.sol * * Created: December 21, 2021 * * An extension of `Ownable.sol` to accomodate for a potential list of owners. * NOTE: this will need to be the last inherited contract to give all parents * access to the modifiers it provides */ pragma solidity >=0.5.16 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; error NotInSquad(); error AlreadyInSquad(); //@title SquadOwnable //@author Satoshigoat (gh:@jcksber) contract SquadOwnable is Ownable { //@dev Ownership - list of squad members (owners) mapping (address => bool) internal _squad; constructor() { //add myself and then kim rose _squad[0xB9699469c0b4dD7B1Dda11dA7678Fa4eFD51211b] = true; _squad[0xF1c2eC71b6547d0b30D23f29B9a0e8f76C7Af743] = true; } //@dev Custom modifier for multiple owners modifier isSquad() { if (!isInSquad(_msgSender())) revert NotInSquad(); _; } //@dev Determine if address `a` is an approved owner function isInSquad(address a) public view returns (bool) { return _squad[a]; } //@dev Add `a` to the squad function addToSquad(address a) external onlyOwner { if (isInSquad(a)) revert AlreadyInSquad(); _squad[a] = true; } //@dev Remove `a` from the squad function removeFromSquad(address a) external onlyOwner { if (!isInSquad(a)) revert NotInSquad(); _squad[a] = false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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); } }
{ "optimizer": { "enabled": true, "runs": 500 }, "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":"AlreadyInSquad","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"string","name":"msg","type":"string"}],"name":"DataError","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotInSquad","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"addToSquad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cycleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"a","type":"address"}],"name":"isInSquad","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxNumTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"purchasePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"removeFromSquad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"safe_kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setCycleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"idx","type":"uint8"},{"internalType":"string","name":"newHash","type":"string"}],"name":"setIPFSHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPriceInWei","type":"uint256"}],"name":"setPurchasePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleIsPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"wallet","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6365385a80601255610260604052603a610200818152608091829190620034936102203981526020016040518060600160405280603a815260200162003459603a913981526020016040518060600160405280603a8152602001620035f0603a913981526020016040518060600160405280603a815260200162003542603a913981526020016040518060600160405280603a8152602001620033e5603a913981526020016040518060600160405280603a8152602001620034cd603a913981526020016040518060600160405280603a81526020016200362a603a913981526020016040518060600160405280603a8152602001620035b6603a913981526020016040518060600160405280603a81526020016200341f603a913981526020016040518060600160405280603b815260200162003507603b913981526020016040518060600160405280603a81526020016200357c603a91398152602001604051806060016040528060398152602001620036646039913990526200018a90601390600c620003ae565b503480156200019857600080fd5b50604051806040016040528060058152602001642cbab3b2b760d91b8152506040518060200160405280600081525060405180604001604052806007815260200166697066733a2f2f60c81b815250828281600290805190602001906200020192919062000405565b5080516200021790600390602084019062000405565b5050600080555062000229336200035c565b600960209081527f1f2f542279960d4e922e627ea353408d4a48ecbf0b08a4446f579e303af01b878054600160ff19918216811790925573f1c2ec71b6547d0b30d23f29b9a0e8f76c7af7436000527fc5cdbecc952ddc170d2a1fa209e3aa14130ae2427f9dd9a3407926de27130d85805490911682179055600a558151620002b991600e919084019062000405565b50604080516020810191829052600090819052620002da91600d9162000405565b505050506040518060800160405280604c81526020016200369d604c913980516200030e91600d9160209091019062000405565b506010805473f1c2ec71b6547d0b30d23f29b9a0e8f76c7af7436001600160a01b03199182168117909255600f80549091169091179055672b05699353b600006011556001600b5562000547565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82600c8101928215620003f3579160200282015b82811115620003f35782518051620003e291849160209091019062000405565b5091602001919060010190620003c2565b506200040192915062000490565b5090565b82805462000413906200050a565b90600052602060002090601f01602090048101928262000437576000855562000482565b82601f106200045257805160ff191683800117855562000482565b8280016001018555821562000482579182015b828111156200048257825182559160200191906001019062000465565b5062000401929150620004b1565b8082111562000401576000620004a78282620004c8565b5060010162000490565b5b80821115620004015760008155600101620004b2565b508054620004d6906200050a565b6000825580601f10620004e7575050565b601f016020900490600052602060002090810190620005079190620004b1565b50565b600181811c908216806200051f57607f821691505b602082108114156200054157634e487b7160e01b600052602260045260246000fd5b50919050565b612e8e80620005576000396000f3fe60806040526004361061023b5760003560e01c80638da5cb5b1161012e578063c87b56dd116100ab578063e8a3d4851161006f578063e8a3d4851461066e578063e985e9c514610683578063ef71bc00146106cc578063f2fde38b146106ec578063f3fef3a31461070c57600080fd5b8063c87b56dd146105e3578063d3ad3c1914610603578063d729666214610623578063de216f6a14610643578063defd6c5f1461065857600080fd5b8063a5a865dc116100f2578063a5a865dc1461055e578063b01e066a14610578578063b2bdfa7b1461058d578063b6fbb0c5146105ad578063b88d4fde146105c357600080fd5b80638da5cb5b146104d557806391192765146104f3578063938e3d7b1461050957806395d89b4114610529578063a22cb4651461053e57600080fd5b806342966c68116101bc5780636e3b5c12116101805780636e3b5c121461042757806370a0823114610447578063715018a6146104675780637c461e181461047c57806387314c41146104b557600080fd5b806342966c681461039f5780635b8d02d7146103bf5780636352211e146103df57806364edfbf0146103ff5780636a6278421461040757600080fd5b806323b872dd1161020357806323b872dd1461031457806330176e1314610334578063335e536c1461035457806341c0e1b51461036a57806342842e0e1461037f57600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806318160ddd146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046129d0565b61072c565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a61077e565b60405161026c9190612b96565b3480156102a357600080fd5b506102b76102b2366004612a7c565b610810565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea366004612877565b610854565b005b3480156102fd57600080fd5b50600154600054035b60405190815260200161026c565b34801561032057600080fd5b506102ef61032f3660046128dc565b6108ff565b34801561034057600080fd5b506102ef61034f366004612a0a565b61090a565b34801561036057600080fd5b5061030660125481565b34801561037657600080fd5b506102ef610a63565b34801561038b57600080fd5b506102ef61039a3660046128dc565b610a6e565b3480156103ab57600080fd5b506102ef6103ba366004612a7c565b610a89565b3480156103cb57600080fd5b50600f546102b7906001600160a01b031681565b3480156103eb57600080fd5b506102b76103fa366004612a7c565b610abb565b6102ef610acd565b34801561041357600080fd5b506102ef61042236600461285a565b610c31565b34801561043357600080fd5b506102ef61044236600461285a565b610d6d565b34801561045357600080fd5b5061030661046236600461285a565b610dcf565b34801561047357600080fd5b506102ef610e1e565b34801561048857600080fd5b5061026061049736600461285a565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156104c157600080fd5b506102ef6104d0366004612a95565b610e32565b3480156104e157600080fd5b506008546001600160a01b03166102b7565b3480156104ff57600080fd5b506103066103e881565b34801561051557600080fd5b506102ef610524366004612a0a565b610fcd565b34801561053557600080fd5b5061028a61111a565b34801561054a57600080fd5b506102ef61055936600461299d565b611129565b34801561056a57600080fd5b50600c546102609060ff1681565b34801561058457600080fd5b506102ef6111bf565b34801561059957600080fd5b506010546102b7906001600160a01b031681565b3480156105b957600080fd5b50610306600b5481565b3480156105cf57600080fd5b506102ef6105de36600461291d565b6111f9565b3480156105ef57600080fd5b5061028a6105fe366004612a7c565b61124a565b34801561060f57600080fd5b506102ef61061e36600461285a565b6112a9565b34801561062f57600080fd5b506102ef61063e366004612a7c565b61130f565b34801561064f57600080fd5b506102ef61138c565b34801561066457600080fd5b5061030660115481565b34801561067a57600080fd5b5061028a611400565b34801561068f57600080fd5b5061026061069e3660046128a3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106d857600080fd5b506102ef6106e7366004612a7c565b61140f565b3480156106f857600080fd5b506102ef61070736600461285a565b61148c565b34801561071857600080fd5b506102ef610727366004612877565b611502565b60006001600160e01b031982166380ac58cd60e01b148061075d57506001600160e01b03198216635b5e139f60e01b145b8061077857506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461078d90612d6b565b80601f01602080910402602001604051908101604052809291908181526020018280546107b990612d6b565b80156108065780601f106107db57610100808354040283529160200191610806565b820191906000526020600020905b8154815290600101906020018083116107e957829003601f168201915b5050505050905090565b600061081b82611606565b610838576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061085f82610abb565b9050806001600160a01b0316836001600160a01b031614156108945760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906108d157506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b156108ef576040516367d9dca160e11b815260040160405180910390fd5b6108fa838383611631565b505050565b6108fa83838361169a565b61091333610497565b6109305760405163093b290f60e01b815260040160405180910390fd5b600e805461093d90612d6b565b80601f016020809104026020016040519081016040528092919081815260200182805461096990612d6b565b80156109b65780601f1061098b576101008083540402835291602001916109b6565b820191906000526020600020905b81548152906001019060200180831161099957829003601f168201915b505050505082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109fe92508491508390506118a5565b15610a505760405162df319960e51b815260206004820152601960248201527f737472696e6773206d75737420626520646966666572656e740000000000000060448201526064015b60405180910390fd5b610a5c600e85856126d7565b5050505050565b610a6b6118da565b33ff5b6108fa838383604051806020016040528060008152506111f9565b610a9233610497565b610aaf5760405163093b290f60e01b815260040160405180910390fd5b610ab881611934565b50565b6000610ac68261193f565b5192915050565b600c5460ff16610b1f5760405162df319960e51b815260206004820152601560248201527f73616c65206973207374696c6c207072697661746500000000000000000000006044820152606401610a47565b6002600a541415610b725760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55600b54600190610b8a6001546000540390565b1415610bca5760405162df319960e51b815260206004820152600f60248201526e1b9bdd08195b9bdd59da081b19599d608a1b6044820152606401610a47565b34601154811015610c1d5760405162df319960e51b815260206004820152601260248201527f696e73756666696369656e742066756e647300000000000000000000000000006044820152606401610a47565b610c28336001611a5b565b50506001600a55565b610c3a33610497565b610c575760405163093b290f60e01b815260040160405180910390fd5b6002600a541415610caa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55600b54600190610cc26001546000540390565b1415610d025760405162df319960e51b815260206004820152600f60248201526e1b9bdd08195b9bdd59da081b19599d608a1b6044820152606401610a47565b81803b63ffffffff1615610d585760405162df319960e51b815260206004820152600f60248201527f73696c6c7920726162626974203a5000000000000000000000000000000000006044820152606401610a47565b610d63836001611a5b565b50506001600a5550565b610d756118da565b6001600160a01b03811660009081526009602052604090205460ff16610dae5760405163093b290f60e01b815260040160405180910390fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b60006001600160a01b038216610df8576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610e266118da565b610e306000611a79565b565b610e3b33610497565b610e585760405163093b290f60e01b815260040160405180910390fd5b600b8260ff161115610eac5760405162df319960e51b815260206004820152601360248201527f696e646578206f7574206f6620626f756e6473000000000000000000000000006044820152606401610a47565b610f5560138360ff16600c8110610ec557610ec5612e01565b018054610ed190612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054610efd90612d6b565b8015610f4a5780601f10610f1f57610100808354040283529160200191610f4a565b820191906000526020600020905b815481529060010190602001808311610f2d57829003601f168201915b5050505050826118a5565b15610fa25760405162df319960e51b815260206004820152601060248201527f68617368206973207468652073616d65000000000000000000000000000000006044820152606401610a47565b8060138360ff16600c8110610fb957610fb9612e01565b0190805190602001906108fa92919061275b565b610fd633610497565b610ff35760405163093b290f60e01b815260040160405180910390fd5b600d805461100090612d6b565b80601f016020809104026020016040519081016040528092919081815260200182805461102c90612d6b565b80156110795780601f1061104e57610100808354040283529160200191611079565b820191906000526020600020905b81548152906001019060200180831161105c57829003601f168201915b505050505082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506110c192508491508390506118a5565b1561110e5760405162df319960e51b815260206004820152601960248201527f737472696e6773206d75737420626520646966666572656e74000000000000006044820152606401610a47565b610a5c600d85856126d7565b60606003805461078d90612d6b565b6001600160a01b0382163314156111535760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111c833610497565b6111e55760405163093b290f60e01b815260040160405180910390fd5b600c805460ff19811660ff90911615179055565b61120484848461169a565b6001600160a01b0383163b15158015611226575061122484848484611ad8565b155b15611244576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061125582611606565b61127257604051630a14c4b560e41b815260040160405180910390fd5b61127a611bd0565b611282611bdf565b604051602001611293929190612b2b565b6040516020818303038152906040529050919050565b6112b16118da565b6001600160a01b03811660009081526009602052604090205460ff16156112eb57604051630db2516960e41b815260040160405180910390fd5b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b61131833610497565b6113355760405163093b290f60e01b815260040160405180910390fd5b8060115414156113875760405162df319960e51b815260206004820152601860248201527f7072696365732063616e2774206265207468652073616d6500000000000000006044820152606401610a47565b601155565b6113946118da565b600154600054036113a433610dcf565b14610a6b5760405162df319960e51b815260206004820152602660248201527f706f74656e7469616c206572726f72202d206e6f7420616c6c20746f6b656e73604482015265081bdddb995960d21b6064820152608401610a47565b6060600d805461078d90612d6b565b61141833610497565b6114355760405163093b290f60e01b815260040160405180910390fd5b8060125414156114875760405162df319960e51b815260206004820181905260248201527f6e65772074696d65206973207468652073616d65206173206f6c642074696d656044820152606401610a47565b601255565b6114946118da565b6001600160a01b0381166114f95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a47565b610ab881611a79565b61150b33610497565b6115285760405163093b290f60e01b815260040160405180910390fd5b6002600a54141561157b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55478111156115d05760405162df319960e51b815260206004820152601e60248201527f696e73756666696369656e742066756e647320746f20776974686472617700006044820152606401610a47565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610d63573d6000803e3d6000fd5b6000805482108015610778575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006116a58261193f565b9050836001600160a01b031681600001516001600160a01b0316146116dc5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061171857506001600160a01b038516600090815260076020908152604080832033845290915290205460ff165b8061173357503361172884610810565b6001600160a01b0316145b90508061175357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661177a57604051633a954ecd60e21b815260040160405180910390fd5b61178660008487611631565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661185c57600054821461185c578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610a5c565b8051825160009184918491146118c057600092505050610778565b808051906020012082805190602001201492505050610778565b6008546001600160a01b03163314610e305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a47565b610ab8816000611ef7565b604080516060810182526000808252602082018190529181019190915281600054811015611a4257600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290611a405780516001600160a01b0316156119d6579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215611a3b579392505050565b6119d6565b505b604051636f96cda160e11b815260040160405180910390fd5b611a758282604051806020016040528060008152506120f0565b5050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611b0d903390899088908890600401612b5a565b602060405180830381600087803b158015611b2757600080fd5b505af1925050508015611b57575060408051601f3d908101601f19168201909252611b54918101906129ed565b60015b611bb2573d808015611b85576040519150601f19603f3d011682016040523d82523d6000602084013e611b8a565b606091505b508051611baa576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600e805461078d90612d6b565b601254606090426000611bf1826120fd565b90506000611c006012546120fd565b90506000611c0e8284612d28565b90506000611c1b8261211d565b611c2f57611c2a606483612dc1565b611c32565b60645b905060648210611ca9576000611c49606484612c2f565b9050611c548361211d565b8015611c645750611c6486612138565b15611c9257601254611c8b90611c7b600184612d28565b611c86906064612cca565b612186565b9650611ca7565b601254611ca490611c86836064612cca565b96505b505b60015b60098111611e1b578060011415611d9b576064831180611ce25750611cd08361211d565b8015611ce25750611ce086612138565b155b15611d9b57858711611d9b57610112611cfb8888612211565b11611d9b576013600b5b018054611d1190612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3d90612d6b565b8015611d8a5780601f10611d5f57610100808354040283529160200191611d8a565b820191906000526020600020905b815481529060010190602001808311611d6d57829003601f168201915b505050505097505050505050505090565b611da681600a612cca565b8211611e0957611db781600a612cca565b821415611dfc57611dc786612138565b15611de9576013611dd9600183612d28565b600c8110611d0557611d05612e01565b601381600c8110611d0557611d05612e01565b6013611dd9600183612d28565b80611e1381612da6565b915050611cac565b60638211611e2c5760136009611d05565b6000611e39886064612186565b90506000611e478883612211565b905060018111611eee576013600a5b018054611e6290612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e8e90612d6b565b8015611edb5780601f10611eb057610100808354040283529160200191611edb565b820191906000526020600020905b815481529060010190602001808311611ebe57829003601f168201915b5050505050995050505050505050505090565b60136009611e56565b6000611f028361193f565b80519091508215611f86576000336001600160a01b0383161480611f4957506001600160a01b038216600090815260076020908152604080832033845290915290205460ff165b80611f64575033611f5986610810565b6001600160a01b0316145b905080611f8457604051632ce44b5f60e11b815260040160405180910390fd5b505b611f9260008583611631565b6001600160a01b038082166000818152600560209081526040808320805470010000000000000000000000000000000060001967ffffffffffffffff80841691909101811667ffffffffffffffff19841681178390048216600190810183169093027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909416179290921783558b86526004909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166120a65760005482146120a6578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060018054810190555050565b6108fa838383600161223f565b600061211461210f6201518084612c2f565b612410565b50909392505050565b600061212a606483612dc1565b158015610778575050151590565b600080612144836124ac565b90506000612151846124c6565b9050600a82108061216d575081600a14801561216d5750601981105b1561217c575060019392505050565b5060009392505050565b600080808061219b61210f6201518088612c2f565b919450925090506121ac8584612be9565b925060006121ba84846124d8565b9050808211156121c8578091505b6121d56201518088612dc1565b620151806121e486868661255e565b6121ee9190612cca565b6121f89190612be9565b94508685101561220757600080fd5b5050505092915050565b60008183111561222057600080fd5b6201518061222e8484612d28565b6122389190612c2f565b9392505050565b6000546001600160a01b03851661226857604051622e076360e81b815260040160405180910390fd5b836122865760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561233857506001600160a01b0387163b15155b156123c1575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46123896000888480600101955088611ad8565b6123a6576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561233e5782600054146123bc57600080fd5b612407565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156123c2575b50600055610a5c565b60008080836226496581018262023ab1600483020590506004600362023ab18302010590910390600062164b09610fa0600185010205905060046105b58202058303601f019250600061098f846050028161246d5761246d612deb565b0590506000605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b60006124be61210f6201518084612c2f565b509392505050565b6000611bc861210f6201518084612c2f565b600081600114806124e95750816003145b806124f45750816005145b806124ff5750816007145b8061250a5750816008145b80612515575081600a145b80612520575081600c145b1561252d5750601f610778565b8160021461253d5750601e610778565b6125468361269b565b61255157601c612554565b601d5b60ff169392505050565b60006107b284101561256f57600080fd5b838383600062253d8c60046064600c612589600e88612ce9565b6125939190612c01565b61259f88611324612ba9565b6125a99190612ba9565b6125b39190612c01565b6125be906003612c43565b6125c89190612c01565b600c806125d6600e88612ce9565b6125e09190612c01565b6125eb90600c612c43565b6125f6600288612ce9565b6126009190612ce9565b61260c9061016f612c43565b6126169190612c01565b6004600c612625600e89612ce9565b61262f9190612c01565b61263b896112c0612ba9565b6126459190612ba9565b612651906105b5612c43565b61265b9190612c01565b612667617d4b87612ce9565b6126719190612ba9565b61267b9190612ba9565b6126859190612ce9565b61268f9190612ce9565b98975050505050505050565b60006126a8600483612dc1565b1580156126be57506126bb606483612dc1565b15155b8061077857506126d061019083612dc1565b1592915050565b8280546126e390612d6b565b90600052602060002090601f016020900481019282612705576000855561274b565b82601f1061271e5782800160ff1982351617855561274b565b8280016001018555821561274b579182015b8281111561274b578235825591602001919060010190612730565b506127579291506127cf565b5090565b82805461276790612d6b565b90600052602060002090601f016020900481019282612789576000855561274b565b82601f106127a257805160ff191683800117855561274b565b8280016001018555821561274b579182015b8281111561274b5782518255916020019190600101906127b4565b5b8082111561275757600081556001016127d0565b600067ffffffffffffffff808411156127ff576127ff612e17565b604051601f8501601f19908116603f0116810190828211818310171561282757612827612e17565b8160405280935085815286868601111561284057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561286c57600080fd5b813561223881612e2d565b6000806040838503121561288a57600080fd5b823561289581612e2d565b946020939093013593505050565b600080604083850312156128b657600080fd5b82356128c181612e2d565b915060208301356128d181612e2d565b809150509250929050565b6000806000606084860312156128f157600080fd5b83356128fc81612e2d565b9250602084013561290c81612e2d565b929592945050506040919091013590565b6000806000806080858703121561293357600080fd5b843561293e81612e2d565b9350602085013561294e81612e2d565b925060408501359150606085013567ffffffffffffffff81111561297157600080fd5b8501601f8101871361298257600080fd5b612991878235602084016127e4565b91505092959194509250565b600080604083850312156129b057600080fd5b82356129bb81612e2d565b9150602083013580151581146128d157600080fd5b6000602082840312156129e257600080fd5b813561223881612e42565b6000602082840312156129ff57600080fd5b815161223881612e42565b60008060208385031215612a1d57600080fd5b823567ffffffffffffffff80821115612a3557600080fd5b818501915085601f830112612a4957600080fd5b813581811115612a5857600080fd5b866020828501011115612a6a57600080fd5b60209290920196919550909350505050565b600060208284031215612a8e57600080fd5b5035919050565b60008060408385031215612aa857600080fd5b823560ff81168114612ab957600080fd5b9150602083013567ffffffffffffffff811115612ad557600080fd5b8301601f81018513612ae657600080fd5b612af5858235602084016127e4565b9150509250929050565b60008151808452612b17816020860160208601612d3f565b601f01601f19169290920160200192915050565b60008351612b3d818460208801612d3f565b835190830190612b51818360208801612d3f565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612b8c6080830184612aff565b9695505050505050565b6020815260006122386020830184612aff565b6000808212826001600160ff1b0303841381151615612bca57612bca612dd5565b600160ff1b8390038412811615612be357612be3612dd5565b50500190565b60008219821115612bfc57612bfc612dd5565b500190565b600082612c1057612c10612deb565b600160ff1b821460001984141615612c2a57612c2a612dd5565b500590565b600082612c3e57612c3e612deb565b500490565b60006001600160ff1b03600084136000841385830485118282161615612c6b57612c6b612dd5565b600160ff1b6000871282811687830589121615612c8a57612c8a612dd5565b60008712925087820587128484161615612ca657612ca6612dd5565b87850587128184161615612cbc57612cbc612dd5565b505050929093029392505050565b6000816000190483118215151615612ce457612ce4612dd5565b500290565b60008083128015600160ff1b850184121615612d0757612d07612dd5565b836001600160ff1b03018313811615612d2257612d22612dd5565b50500390565b600082821015612d3a57612d3a612dd5565b500390565b60005b83811015612d5a578181015183820152602001612d42565b838111156112445750506000910152565b600181811c90821680612d7f57607f821691505b60208210811415612da057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dba57612dba612dd5565b5060010190565b600082612dd057612dd0612deb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ab857600080fd5b6001600160e01b031981168114610ab857600080fdfea2646970667358221220d393cef6d6a51d60bbda0aa2a6ba9497954922a122bf271ef74fdf21e2a428bb64736f6c63430008070033516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d352e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d392e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d322e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d312e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d362e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d31302e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d342e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f626c61636b322e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d382e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d332e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f726564322d372e6a736f6e516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f676f6c64322e6a736f6e697066733a2f2f516d577478757a724e61326a33536d5565576a587a6b4e57576962655578336d50437069435432367566726932772f63656e74757279322d636f6e74726163742e6a736f6e
Deployed Bytecode
0x60806040526004361061023b5760003560e01c80638da5cb5b1161012e578063c87b56dd116100ab578063e8a3d4851161006f578063e8a3d4851461066e578063e985e9c514610683578063ef71bc00146106cc578063f2fde38b146106ec578063f3fef3a31461070c57600080fd5b8063c87b56dd146105e3578063d3ad3c1914610603578063d729666214610623578063de216f6a14610643578063defd6c5f1461065857600080fd5b8063a5a865dc116100f2578063a5a865dc1461055e578063b01e066a14610578578063b2bdfa7b1461058d578063b6fbb0c5146105ad578063b88d4fde146105c357600080fd5b80638da5cb5b146104d557806391192765146104f3578063938e3d7b1461050957806395d89b4114610529578063a22cb4651461053e57600080fd5b806342966c68116101bc5780636e3b5c12116101805780636e3b5c121461042757806370a0823114610447578063715018a6146104675780637c461e181461047c57806387314c41146104b557600080fd5b806342966c681461039f5780635b8d02d7146103bf5780636352211e146103df57806364edfbf0146103ff5780636a6278421461040757600080fd5b806323b872dd1161020357806323b872dd1461031457806330176e1314610334578063335e536c1461035457806341c0e1b51461036a57806342842e0e1461037f57600080fd5b806301ffc9a71461024057806306fdde0314610275578063081812fc14610297578063095ea7b3146102cf57806318160ddd146102f1575b600080fd5b34801561024c57600080fd5b5061026061025b3660046129d0565b61072c565b60405190151581526020015b60405180910390f35b34801561028157600080fd5b5061028a61077e565b60405161026c9190612b96565b3480156102a357600080fd5b506102b76102b2366004612a7c565b610810565b6040516001600160a01b03909116815260200161026c565b3480156102db57600080fd5b506102ef6102ea366004612877565b610854565b005b3480156102fd57600080fd5b50600154600054035b60405190815260200161026c565b34801561032057600080fd5b506102ef61032f3660046128dc565b6108ff565b34801561034057600080fd5b506102ef61034f366004612a0a565b61090a565b34801561036057600080fd5b5061030660125481565b34801561037657600080fd5b506102ef610a63565b34801561038b57600080fd5b506102ef61039a3660046128dc565b610a6e565b3480156103ab57600080fd5b506102ef6103ba366004612a7c565b610a89565b3480156103cb57600080fd5b50600f546102b7906001600160a01b031681565b3480156103eb57600080fd5b506102b76103fa366004612a7c565b610abb565b6102ef610acd565b34801561041357600080fd5b506102ef61042236600461285a565b610c31565b34801561043357600080fd5b506102ef61044236600461285a565b610d6d565b34801561045357600080fd5b5061030661046236600461285a565b610dcf565b34801561047357600080fd5b506102ef610e1e565b34801561048857600080fd5b5061026061049736600461285a565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156104c157600080fd5b506102ef6104d0366004612a95565b610e32565b3480156104e157600080fd5b506008546001600160a01b03166102b7565b3480156104ff57600080fd5b506103066103e881565b34801561051557600080fd5b506102ef610524366004612a0a565b610fcd565b34801561053557600080fd5b5061028a61111a565b34801561054a57600080fd5b506102ef61055936600461299d565b611129565b34801561056a57600080fd5b50600c546102609060ff1681565b34801561058457600080fd5b506102ef6111bf565b34801561059957600080fd5b506010546102b7906001600160a01b031681565b3480156105b957600080fd5b50610306600b5481565b3480156105cf57600080fd5b506102ef6105de36600461291d565b6111f9565b3480156105ef57600080fd5b5061028a6105fe366004612a7c565b61124a565b34801561060f57600080fd5b506102ef61061e36600461285a565b6112a9565b34801561062f57600080fd5b506102ef61063e366004612a7c565b61130f565b34801561064f57600080fd5b506102ef61138c565b34801561066457600080fd5b5061030660115481565b34801561067a57600080fd5b5061028a611400565b34801561068f57600080fd5b5061026061069e3660046128a3565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156106d857600080fd5b506102ef6106e7366004612a7c565b61140f565b3480156106f857600080fd5b506102ef61070736600461285a565b61148c565b34801561071857600080fd5b506102ef610727366004612877565b611502565b60006001600160e01b031982166380ac58cd60e01b148061075d57506001600160e01b03198216635b5e139f60e01b145b8061077857506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461078d90612d6b565b80601f01602080910402602001604051908101604052809291908181526020018280546107b990612d6b565b80156108065780601f106107db57610100808354040283529160200191610806565b820191906000526020600020905b8154815290600101906020018083116107e957829003601f168201915b5050505050905090565b600061081b82611606565b610838576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061085f82610abb565b9050806001600160a01b0316836001600160a01b031614156108945760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906108d157506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b156108ef576040516367d9dca160e11b815260040160405180910390fd5b6108fa838383611631565b505050565b6108fa83838361169a565b61091333610497565b6109305760405163093b290f60e01b815260040160405180910390fd5b600e805461093d90612d6b565b80601f016020809104026020016040519081016040528092919081815260200182805461096990612d6b565b80156109b65780601f1061098b576101008083540402835291602001916109b6565b820191906000526020600020905b81548152906001019060200180831161099957829003601f168201915b505050505082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506109fe92508491508390506118a5565b15610a505760405162df319960e51b815260206004820152601960248201527f737472696e6773206d75737420626520646966666572656e740000000000000060448201526064015b60405180910390fd5b610a5c600e85856126d7565b5050505050565b610a6b6118da565b33ff5b6108fa838383604051806020016040528060008152506111f9565b610a9233610497565b610aaf5760405163093b290f60e01b815260040160405180910390fd5b610ab881611934565b50565b6000610ac68261193f565b5192915050565b600c5460ff16610b1f5760405162df319960e51b815260206004820152601560248201527f73616c65206973207374696c6c207072697661746500000000000000000000006044820152606401610a47565b6002600a541415610b725760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55600b54600190610b8a6001546000540390565b1415610bca5760405162df319960e51b815260206004820152600f60248201526e1b9bdd08195b9bdd59da081b19599d608a1b6044820152606401610a47565b34601154811015610c1d5760405162df319960e51b815260206004820152601260248201527f696e73756666696369656e742066756e647300000000000000000000000000006044820152606401610a47565b610c28336001611a5b565b50506001600a55565b610c3a33610497565b610c575760405163093b290f60e01b815260040160405180910390fd5b6002600a541415610caa5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55600b54600190610cc26001546000540390565b1415610d025760405162df319960e51b815260206004820152600f60248201526e1b9bdd08195b9bdd59da081b19599d608a1b6044820152606401610a47565b81803b63ffffffff1615610d585760405162df319960e51b815260206004820152600f60248201527f73696c6c7920726162626974203a5000000000000000000000000000000000006044820152606401610a47565b610d63836001611a5b565b50506001600a5550565b610d756118da565b6001600160a01b03811660009081526009602052604090205460ff16610dae5760405163093b290f60e01b815260040160405180910390fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b60006001600160a01b038216610df8576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610e266118da565b610e306000611a79565b565b610e3b33610497565b610e585760405163093b290f60e01b815260040160405180910390fd5b600b8260ff161115610eac5760405162df319960e51b815260206004820152601360248201527f696e646578206f7574206f6620626f756e6473000000000000000000000000006044820152606401610a47565b610f5560138360ff16600c8110610ec557610ec5612e01565b018054610ed190612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054610efd90612d6b565b8015610f4a5780601f10610f1f57610100808354040283529160200191610f4a565b820191906000526020600020905b815481529060010190602001808311610f2d57829003601f168201915b5050505050826118a5565b15610fa25760405162df319960e51b815260206004820152601060248201527f68617368206973207468652073616d65000000000000000000000000000000006044820152606401610a47565b8060138360ff16600c8110610fb957610fb9612e01565b0190805190602001906108fa92919061275b565b610fd633610497565b610ff35760405163093b290f60e01b815260040160405180910390fd5b600d805461100090612d6b565b80601f016020809104026020016040519081016040528092919081815260200182805461102c90612d6b565b80156110795780601f1061104e57610100808354040283529160200191611079565b820191906000526020600020905b81548152906001019060200180831161105c57829003601f168201915b505050505082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506110c192508491508390506118a5565b1561110e5760405162df319960e51b815260206004820152601960248201527f737472696e6773206d75737420626520646966666572656e74000000000000006044820152606401610a47565b610a5c600d85856126d7565b60606003805461078d90612d6b565b6001600160a01b0382163314156111535760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111c833610497565b6111e55760405163093b290f60e01b815260040160405180910390fd5b600c805460ff19811660ff90911615179055565b61120484848461169a565b6001600160a01b0383163b15158015611226575061122484848484611ad8565b155b15611244576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b606061125582611606565b61127257604051630a14c4b560e41b815260040160405180910390fd5b61127a611bd0565b611282611bdf565b604051602001611293929190612b2b565b6040516020818303038152906040529050919050565b6112b16118da565b6001600160a01b03811660009081526009602052604090205460ff16156112eb57604051630db2516960e41b815260040160405180910390fd5b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b61131833610497565b6113355760405163093b290f60e01b815260040160405180910390fd5b8060115414156113875760405162df319960e51b815260206004820152601860248201527f7072696365732063616e2774206265207468652073616d6500000000000000006044820152606401610a47565b601155565b6113946118da565b600154600054036113a433610dcf565b14610a6b5760405162df319960e51b815260206004820152602660248201527f706f74656e7469616c206572726f72202d206e6f7420616c6c20746f6b656e73604482015265081bdddb995960d21b6064820152608401610a47565b6060600d805461078d90612d6b565b61141833610497565b6114355760405163093b290f60e01b815260040160405180910390fd5b8060125414156114875760405162df319960e51b815260206004820181905260248201527f6e65772074696d65206973207468652073616d65206173206f6c642074696d656044820152606401610a47565b601255565b6114946118da565b6001600160a01b0381166114f95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a47565b610ab881611a79565b61150b33610497565b6115285760405163093b290f60e01b815260040160405180910390fd5b6002600a54141561157b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a47565b6002600a55478111156115d05760405162df319960e51b815260206004820152601e60248201527f696e73756666696369656e742066756e647320746f20776974686472617700006044820152606401610a47565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610d63573d6000803e3d6000fd5b6000805482108015610778575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006116a58261193f565b9050836001600160a01b031681600001516001600160a01b0316146116dc5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061171857506001600160a01b038516600090815260076020908152604080832033845290915290205460ff165b8061173357503361172884610810565b6001600160a01b0316145b90508061175357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661177a57604051633a954ecd60e21b815260040160405180910390fd5b61178660008487611631565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661185c57600054821461185c578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610a5c565b8051825160009184918491146118c057600092505050610778565b808051906020012082805190602001201492505050610778565b6008546001600160a01b03163314610e305760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a47565b610ab8816000611ef7565b604080516060810182526000808252602082018190529181019190915281600054811015611a4257600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290611a405780516001600160a01b0316156119d6579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215611a3b579392505050565b6119d6565b505b604051636f96cda160e11b815260040160405180910390fd5b611a758282604051806020016040528060008152506120f0565b5050565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611b0d903390899088908890600401612b5a565b602060405180830381600087803b158015611b2757600080fd5b505af1925050508015611b57575060408051601f3d908101601f19168201909252611b54918101906129ed565b60015b611bb2573d808015611b85576040519150601f19603f3d011682016040523d82523d6000602084013e611b8a565b606091505b508051611baa576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600e805461078d90612d6b565b601254606090426000611bf1826120fd565b90506000611c006012546120fd565b90506000611c0e8284612d28565b90506000611c1b8261211d565b611c2f57611c2a606483612dc1565b611c32565b60645b905060648210611ca9576000611c49606484612c2f565b9050611c548361211d565b8015611c645750611c6486612138565b15611c9257601254611c8b90611c7b600184612d28565b611c86906064612cca565b612186565b9650611ca7565b601254611ca490611c86836064612cca565b96505b505b60015b60098111611e1b578060011415611d9b576064831180611ce25750611cd08361211d565b8015611ce25750611ce086612138565b155b15611d9b57858711611d9b57610112611cfb8888612211565b11611d9b576013600b5b018054611d1190612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d3d90612d6b565b8015611d8a5780601f10611d5f57610100808354040283529160200191611d8a565b820191906000526020600020905b815481529060010190602001808311611d6d57829003601f168201915b505050505097505050505050505090565b611da681600a612cca565b8211611e0957611db781600a612cca565b821415611dfc57611dc786612138565b15611de9576013611dd9600183612d28565b600c8110611d0557611d05612e01565b601381600c8110611d0557611d05612e01565b6013611dd9600183612d28565b80611e1381612da6565b915050611cac565b60638211611e2c5760136009611d05565b6000611e39886064612186565b90506000611e478883612211565b905060018111611eee576013600a5b018054611e6290612d6b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e8e90612d6b565b8015611edb5780601f10611eb057610100808354040283529160200191611edb565b820191906000526020600020905b815481529060010190602001808311611ebe57829003601f168201915b5050505050995050505050505050505090565b60136009611e56565b6000611f028361193f565b80519091508215611f86576000336001600160a01b0383161480611f4957506001600160a01b038216600090815260076020908152604080832033845290915290205460ff165b80611f64575033611f5986610810565b6001600160a01b0316145b905080611f8457604051632ce44b5f60e11b815260040160405180910390fd5b505b611f9260008583611631565b6001600160a01b038082166000818152600560209081526040808320805470010000000000000000000000000000000060001967ffffffffffffffff80841691909101811667ffffffffffffffff19841681178390048216600190810183169093027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909416179290921783558b86526004909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166120a65760005482146120a6578054602087015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060018054810190555050565b6108fa838383600161223f565b600061211461210f6201518084612c2f565b612410565b50909392505050565b600061212a606483612dc1565b158015610778575050151590565b600080612144836124ac565b90506000612151846124c6565b9050600a82108061216d575081600a14801561216d5750601981105b1561217c575060019392505050565b5060009392505050565b600080808061219b61210f6201518088612c2f565b919450925090506121ac8584612be9565b925060006121ba84846124d8565b9050808211156121c8578091505b6121d56201518088612dc1565b620151806121e486868661255e565b6121ee9190612cca565b6121f89190612be9565b94508685101561220757600080fd5b5050505092915050565b60008183111561222057600080fd5b6201518061222e8484612d28565b6122389190612c2f565b9392505050565b6000546001600160a01b03851661226857604051622e076360e81b815260040160405180910390fd5b836122865760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561233857506001600160a01b0387163b15155b156123c1575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46123896000888480600101955088611ad8565b6123a6576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561233e5782600054146123bc57600080fd5b612407565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156123c2575b50600055610a5c565b60008080836226496581018262023ab1600483020590506004600362023ab18302010590910390600062164b09610fa0600185010205905060046105b58202058303601f019250600061098f846050028161246d5761246d612deb565b0590506000605061098f83020585039050600b820560301994909401606402929092018301996002600c90940290910392909201975095509350505050565b60006124be61210f6201518084612c2f565b509392505050565b6000611bc861210f6201518084612c2f565b600081600114806124e95750816003145b806124f45750816005145b806124ff5750816007145b8061250a5750816008145b80612515575081600a145b80612520575081600c145b1561252d5750601f610778565b8160021461253d5750601e610778565b6125468361269b565b61255157601c612554565b601d5b60ff169392505050565b60006107b284101561256f57600080fd5b838383600062253d8c60046064600c612589600e88612ce9565b6125939190612c01565b61259f88611324612ba9565b6125a99190612ba9565b6125b39190612c01565b6125be906003612c43565b6125c89190612c01565b600c806125d6600e88612ce9565b6125e09190612c01565b6125eb90600c612c43565b6125f6600288612ce9565b6126009190612ce9565b61260c9061016f612c43565b6126169190612c01565b6004600c612625600e89612ce9565b61262f9190612c01565b61263b896112c0612ba9565b6126459190612ba9565b612651906105b5612c43565b61265b9190612c01565b612667617d4b87612ce9565b6126719190612ba9565b61267b9190612ba9565b6126859190612ce9565b61268f9190612ce9565b98975050505050505050565b60006126a8600483612dc1565b1580156126be57506126bb606483612dc1565b15155b8061077857506126d061019083612dc1565b1592915050565b8280546126e390612d6b565b90600052602060002090601f016020900481019282612705576000855561274b565b82601f1061271e5782800160ff1982351617855561274b565b8280016001018555821561274b579182015b8281111561274b578235825591602001919060010190612730565b506127579291506127cf565b5090565b82805461276790612d6b565b90600052602060002090601f016020900481019282612789576000855561274b565b82601f106127a257805160ff191683800117855561274b565b8280016001018555821561274b579182015b8281111561274b5782518255916020019190600101906127b4565b5b8082111561275757600081556001016127d0565b600067ffffffffffffffff808411156127ff576127ff612e17565b604051601f8501601f19908116603f0116810190828211818310171561282757612827612e17565b8160405280935085815286868601111561284057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561286c57600080fd5b813561223881612e2d565b6000806040838503121561288a57600080fd5b823561289581612e2d565b946020939093013593505050565b600080604083850312156128b657600080fd5b82356128c181612e2d565b915060208301356128d181612e2d565b809150509250929050565b6000806000606084860312156128f157600080fd5b83356128fc81612e2d565b9250602084013561290c81612e2d565b929592945050506040919091013590565b6000806000806080858703121561293357600080fd5b843561293e81612e2d565b9350602085013561294e81612e2d565b925060408501359150606085013567ffffffffffffffff81111561297157600080fd5b8501601f8101871361298257600080fd5b612991878235602084016127e4565b91505092959194509250565b600080604083850312156129b057600080fd5b82356129bb81612e2d565b9150602083013580151581146128d157600080fd5b6000602082840312156129e257600080fd5b813561223881612e42565b6000602082840312156129ff57600080fd5b815161223881612e42565b60008060208385031215612a1d57600080fd5b823567ffffffffffffffff80821115612a3557600080fd5b818501915085601f830112612a4957600080fd5b813581811115612a5857600080fd5b866020828501011115612a6a57600080fd5b60209290920196919550909350505050565b600060208284031215612a8e57600080fd5b5035919050565b60008060408385031215612aa857600080fd5b823560ff81168114612ab957600080fd5b9150602083013567ffffffffffffffff811115612ad557600080fd5b8301601f81018513612ae657600080fd5b612af5858235602084016127e4565b9150509250929050565b60008151808452612b17816020860160208601612d3f565b601f01601f19169290920160200192915050565b60008351612b3d818460208801612d3f565b835190830190612b51818360208801612d3f565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612b8c6080830184612aff565b9695505050505050565b6020815260006122386020830184612aff565b6000808212826001600160ff1b0303841381151615612bca57612bca612dd5565b600160ff1b8390038412811615612be357612be3612dd5565b50500190565b60008219821115612bfc57612bfc612dd5565b500190565b600082612c1057612c10612deb565b600160ff1b821460001984141615612c2a57612c2a612dd5565b500590565b600082612c3e57612c3e612deb565b500490565b60006001600160ff1b03600084136000841385830485118282161615612c6b57612c6b612dd5565b600160ff1b6000871282811687830589121615612c8a57612c8a612dd5565b60008712925087820587128484161615612ca657612ca6612dd5565b87850587128184161615612cbc57612cbc612dd5565b505050929093029392505050565b6000816000190483118215151615612ce457612ce4612dd5565b500290565b60008083128015600160ff1b850184121615612d0757612d07612dd5565b836001600160ff1b03018313811615612d2257612d22612dd5565b50500390565b600082821015612d3a57612d3a612dd5565b500390565b60005b83811015612d5a578181015183820152602001612d42565b838111156112445750506000910152565b600181811c90821680612d7f57607f821691505b60208210811415612da057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dba57612dba612dd5565b5060010190565b600082612dd057612dd0612deb565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ab857600080fd5b6001600160e01b031981168114610ab857600080fdfea2646970667358221220d393cef6d6a51d60bbda0aa2a6ba9497954922a122bf271ef74fdf21e2a428bb64736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.