Overview
ETH Balance
0.03284713375796178 ETH
Eth Value
$107.40 (@ $3,269.82/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 40 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Mint | 19805904 | 59 days ago | IN | 0.00636942 ETH | 0.00060877 | ||||
Mint | 19805900 | 59 days ago | IN | 0.00636942 ETH | 0.00060828 | ||||
Mint | 19805897 | 59 days ago | IN | 0.00636942 ETH | 0.0006458 | ||||
Mint | 19805886 | 59 days ago | IN | 0.00636942 ETH | 0.00056959 | ||||
Mint | 19805879 | 59 days ago | IN | 0.00636942 ETH | 0.00102992 | ||||
Set Current Seas... | 19805864 | 59 days ago | IN | 0 ETH | 0.00022426 | ||||
Set Uri Prefix | 19805750 | 59 days ago | IN | 0 ETH | 0.0001965 | ||||
Withdraw Funds T... | 19805612 | 59 days ago | IN | 0 ETH | 0.00091867 | ||||
Set Class Winner... | 19805601 | 59 days ago | IN | 0 ETH | 0.00086178 | ||||
Withdraw Funds T... | 19805589 | 59 days ago | IN | 0 ETH | 0.0013061 | ||||
Set Class Winner... | 19805539 | 59 days ago | IN | 0 ETH | 0.0003551 | ||||
Set Class Winner... | 19805229 | 59 days ago | IN | 0 ETH | 0.00043439 | ||||
Mint | 19075834 | 161 days ago | IN | 0.00894054 ETH | 0.0012894 | ||||
Mint | 19075830 | 161 days ago | IN | 0.00894054 ETH | 0.00133625 | ||||
Mint | 19075828 | 161 days ago | IN | 0.00894054 ETH | 0.00143796 | ||||
Mint | 19075815 | 161 days ago | IN | 0.00894054 ETH | 0.00215158 | ||||
Set Current Seas... | 19075805 | 161 days ago | IN | 0 ETH | 0.00048882 | ||||
Record Season UR... | 19075791 | 161 days ago | IN | 0 ETH | 0.00167314 | ||||
Set Uri Prefix | 19075657 | 161 days ago | IN | 0 ETH | 0.00037859 | ||||
Withdraw Funds T... | 19074986 | 161 days ago | IN | 0 ETH | 0.00068947 | ||||
Set Class Winner... | 19074959 | 161 days ago | IN | 0 ETH | 0.00055359 | ||||
Season End Activ... | 19074937 | 161 days ago | IN | 0 ETH | 0.00177033 | ||||
Set Active Seaso... | 19074931 | 161 days ago | IN | 0 ETH | 0.00195746 | ||||
Mint | 18388142 | 257 days ago | IN | 0.01277955 ETH | 0.00134009 | ||||
Set Season Entry... | 18387478 | 257 days ago | IN | 0 ETH | 0.00045229 |
Loading...
Loading
Contract Name:
HOSNftToken
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-or-later /* 01000001 01101010 01101001 01101111 01101110 01001100 01100001 01100010 01110011 00110010 00110000 00110010 00110011 ██░ ██ ▓█████ ██▀███ ▒█████ ▓█████ ██████ ▒█████ █████▒ ▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒▒██▒ ██▒▓█ ▀ ▒██ ▒ ▒██▒ ██▒▓██ ▒ ▒██▀▀██░▒███ ▓██ ░▄█ ▒▒██░ ██▒▒███ ░ ▓██▄ ▒██░ ██▒▒████ ░ ░▓█ ░██ ▒▓█ ▄ ▒██▀▀█▄ ▒██ ██░▒▓█ ▄ ▒ ██▒ ▒██ ██░░▓█▒ ░ ░▓█▒░██▓░▒████▒░██▓ ▒██▒░ ████▓▒░░▒████▒▒██████▒▒ ░ ████▓▒░░▒█░ ▒ ░░▒░▒░░ ▒░ ░░ ▒▓ ░▒▓░░ ▒░▒░▒░ ░░ ▒░ ░▒ ▒▓▒ ▒ ░ ░ ▒░▒░▒░ ▒ ░ ▒ ░▒░ ░ ░ ░ ░ ░▒ ░ ▒░ ░ ▒ ▒░ ░ ░ ░░ ░▒ ░ ░ ░ ▒ ▒░ ░ ░ ░░ ░ ░ ░░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ██████ ▄▄▄ ███▄ █ ▄████▄ ▄▄▄█████▓ █ ██ ▄▄▄ ██▀███ ▓██ ██▓ ▒██ ▒ ▒████▄ ██ ▀█ █ ▒██▀ ▀█ ▓ ██▒ ▓▒ ██ ▓██▒▒████▄ ▓██ ▒ ██▒▒██ ██▒ ░ ▓██▄ ▒██ ▀█▄ ▓██ ▀█ ██▒▒▓█ ▄ ▒ ▓██░ ▒░▓██ ▒██░▒██ ▀█▄ ▓██ ░▄█ ▒ ▒██ ██░ ▒ ██▒░██▄▄▄▄██ ▓██▒ ▐▌██▒▒▓▓▄ ▄██▒░ ▓██▓ ░ ▓▓█ ░██░░██▄▄▄▄██ ▒██▀▀█▄ ░ ▐██▓░ ▒██████▒▒ ▓█ ▓██▒▒██░ ▓██░▒ ▓███▀ ░ ▒██▒ ░ ▒▒█████▓ ▓█ ▓██▒░██▓ ▒██▒ ░ ██▒▓░ ▒ ▒▓▒ ▒ ░ ▒▒ ▓▒█░░ ▒░ ▒ ▒ ░ ░▒ ▒ ░ ▒ ░░ ░▒▓▒ ▒ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░ ██▒▒▒ ░ ░▒ ░ ░ ▒ ▒▒ ░░ ░░ ░ ▒░ ░ ▒ ░ ░░▒░ ░ ░ ▒ ▒▒ ░ ░▒ ░ ▒░▓██ ░▒░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░░░ ░ ░ ░ ▒ ░░ ░ ▒ ▒ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ 01000001 01101010 01101001 01101111 01101110 00100000 01000011 01101111 01110010 01110000 01101111 01110010 01100001 01110100 01101001 01101111 01101110 */ pragma solidity >=0.8.19 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "./HOSWinnersSUB.sol"; contract HOSNftToken is HOSWinnersSUB, ERC721AQueryable { using Strings for uint256; AggregatorV3Interface internal priceFeed; // ********** VARIABLES ********** // // Registration is closed for the current season bool public lockedSeason = false; // Final snapshot for the season bool public seasonEnded = false; uint256 public entryFeeInUsd = 50; // In USD string public uriPrefix = ""; string public uriSuffix = ".json"; uint256 public maxSupply; uint256 public maxMintAmountPerTx; bool public paused = true; bool public lockedSupply = false; // Storing keys for offical URIs string[] public keyRecords; uint256 public keyRecordsLength = 0; // Mapping from season number to balance mapping(uint => uint) public seasonBalances; // Mapping to record the season of each holder, by address and all of Holders during season mapping(address => uint256) public seasonOfHolder; // Mapping to record the snapshot of holders for each season mapping(uint256 => address[]) public _seasonSnapshot; // Mapping to record if a holder is active for a season, with the tokenIds mapping(uint256 => mapping(address => uint256[])) public _activeHolders; // Mapping to record if a holder is active for a season, with the tokenIds mapping(uint256 => mapping(address => uint256[])) public _finalHolders; // Mapping to record the snapshot of holders for each season mapping(uint256 => address[]) public _activeHoldersSeason; // Mapping to record the snapshot of holders at the end of the season mapping(uint256 => address[]) public _finalHoldersSeason; // Mapping to record the snapshot of holders for each season mapping(uint256 => string) public seasonRecordsURI; // Mapping to set of official URIs for contract confirmation mapping(string => string) public officialURIs; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _maxSupply, uint256 _maxMintAmountPerTx, address _priceFeed ) ERC721A(_tokenName, _tokenSymbol) { maxSupply = _maxSupply; setMaxMintAmountPerTx(_maxMintAmountPerTx); priceFeed = AggregatorV3Interface(_priceFeed); } // ********** EVENTS ********** // event Received(address, uint); event Minted(address indexed to, uint256 amount, uint256 totalSupply); event MintedForAddress( address indexed to, uint256 amount, uint256 totalSupply ); event MaxSupplyChanged(uint256 oldMaxSupply, uint256 newMaxSupply); event URIPrefixChanged(string oldPrefix, string newPrefix); event URISuffixChanged(string oldSuffix, string newSuffix); event PausedStateSet(bool isPaused); event LockStateSet(bool isLocked); event SeasonEndStateUpdate(bool state); event SeasonChanged(uint256 oldSeason, uint256 newSeason); event SeasonLockedStateSet(uint256 season, bool isLocked); event PriceFeedChanged(address oldPriceFeed, address newPriceFeed); event SeasonEntryFeeChanged(uint256 oldFee, uint256 newFee); event SeasonFeePaid(address payer, uint256 season, uint256 fee); event AddPlayerToSeason(address player, uint256 season); event SetActiveSeasonSnapshot(uint256 season); event SeasonEndActiveHoldersSnapshot(uint256 season); event Withdraw(); event SetOwnerCommission(uint percentage); event SetRecordSeasonURI(uint season, string uri); event PlayerRemovedFromSeason(address player, uint season); event PlayerAddedToSeason(address player, uint season); // ********** RECEIVE ********** // receive() external payable { emit Received(msg.sender, msg.value); // Update the balance for the current season seasonBalances[currentSeason] += msg.value; } // ********** MODIFIERS ********** // modifier mintCompliance(uint256 _mintAmount) { require( _mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid amount" ); require(totalSupply() + _mintAmount <= maxSupply, "Max supply"); _; } modifier mintPriceCompliance(uint256 _mintAmount) { uint256 mintPriceInEth = calculateEntryFeeInEth(); require(msg.value >= _mintAmount * mintPriceInEth, "Deficient funds"); _; } // ********** SERVICES ********** // function mint( uint256 _mintAmount ) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { require(!paused, "Mint is paused"); require(!(isPlayerInSeason(_msgSender()) && lockedSeason), "locked"); uint256 adjust = lockedSeason ? 1 : 0; uint256 actualSeason = currentSeason + adjust; _safeMint(_msgSender(), _mintAmount); seasonOfHolder[_msgSender()] = actualSeason; bool found = false; for (uint i = 0; i < _seasonSnapshot[actualSeason].length; i++) { if (_seasonSnapshot[actualSeason][i] == _msgSender()) { found = true; break; } } if (!found) { _seasonSnapshot[actualSeason].push(_msgSender()); } seasonBalances[actualSeason] += msg.value; emit Minted(_msgSender(), _mintAmount, totalSupply()); } function mintForAddress( uint256 _mintAmount, address _receiver ) public mintCompliance(_mintAmount) onlyOwner { _safeMint(_receiver, _mintAmount); emit MintedForAddress(_receiver, _mintAmount, totalSupply()); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function tokenURI( uint256 _tokenId ) public view virtual override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), "No token"); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string( abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix) ) : ""; } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { maxMintAmountPerTx = _maxMintAmountPerTx; } function setMaxSupply(uint256 _maxSupply) public onlyOwner { require(!lockedSupply, "Supply locked"); maxSupply = _maxSupply; emit MaxSupplyChanged(totalSupply(), _maxSupply); } function setUriPrefix(string memory _uriPrefix) public onlyOwner { uriPrefix = _uriPrefix; emit URIPrefixChanged(uriPrefix, _uriPrefix); } function setUriSuffix(string memory _uriSuffix) public onlyOwner { uriSuffix = _uriSuffix; emit URISuffixChanged(uriSuffix, _uriSuffix); } function setPaused(bool _state) public onlyOwner { paused = _state; emit PausedStateSet(paused); } function setLocked(bool _lock) public onlyOwner { require(!lockedSupply, "Supply locked"); lockedSupply = _lock; emit LockStateSet(lockedSupply); } // ********** SEASON ********** // function setCurrentSeason(uint256 _season) public onlyOwner { require(_season > currentSeason, "!gt season"); currentSeason = _season; lockSeason(false); setSeasonEnd(false); emit SeasonChanged(currentSeason, _season); } // Season is locked when the snapshot is taken and no more players can join function lockSeason(bool _stateLocked) public onlyOwner { lockedSeason = _stateLocked; emit SeasonLockedStateSet(currentSeason, lockedSeason); } // Season ended when the final snapshot is taken, anyone holding Ticket(NFT) are the final participants function setSeasonEnd(bool _state) public onlyOwner { seasonEnded = _state; emit SeasonEndStateUpdate(seasonEnded); } // Determine if Player is in the current season through different states of a season and holding a Ticket(NFT) function isPlayerInSeason(address _player) public view returns (bool) { if (seasonEnded) { return seasonOfHolder[_player] == currentSeason && _finalHolders[currentSeason][_player].length > 0 && balanceOf(_player) > 0; } if (lockedSeason) { return seasonOfHolder[_player] == currentSeason && _activeHolders[currentSeason][_player].length > 0 && balanceOf(_player) > 0; } return seasonOfHolder[_player] == currentSeason && balanceOf(_player) > 0; } // Get the current season of a player function getPlayerSeason(address _player) public view returns (uint256) { return seasonOfHolder[_player]; } // Get a list of participants for a season function getHoldersForSeason( uint256 _season ) public view returns (address[] memory) { return _seasonSnapshot[_season]; } // Get a list of participants for a season post Snapshot function getActiveSeasonPlayers( uint256 _season ) public view returns (address[] memory) { return _activeHoldersSeason[_season]; } // Get a final list of participants at the end of a season function getFinalSeasonPlayers( uint256 _season ) public view returns (address[] memory) { return _finalHoldersSeason[_season]; } // Is player active in a season post snapshop function isActiveHolder( uint256 _season, address _holder ) public view returns (uint256[] memory) { return _activeHolders[_season][_holder]; } // Is player active in a season at the end of the season function isFinalHolder( uint256 _season, address _holder ) public view returns (uint256[] memory) { return _finalHolders[_season][_holder]; } // BAN or Griefing behaviour function removePlayerFromSeason( address _player, uint256 _season ) public onlyOwner { if (seasonEnded) { require(_finalHolders[_season][_player].length > 0, "Not in season"); delete _finalHolders[_season][_player]; seasonOfHolder[_player] = 0; } else if (lockedSeason) { require(_activeHolders[_season][_player].length > 0, "Not in season"); delete _activeHolders[_season][_player]; seasonOfHolder[_player] = 0; } else { require(_seasonSnapshot[_season].length > 0, "No players"); seasonOfHolder[_player] = 0; } emit PlayerRemovedFromSeason(_player, _season); } // In case the ban or wrong behaviour was a mistake function addPlayerToSeason( address _player, uint256 _season ) public onlyOwner { if (seasonEnded) { require(_finalHolders[_season][_player].length == 0, "Player in season"); require(balanceOf(_player) > 0, "Balance 0"); _finalHolders[_season][_player] = this.tokensOfOwner(_player); seasonOfHolder[_player] = _season; } else if (lockedSeason) { require(_activeHolders[_season][_player].length == 0, "Player in season"); require(balanceOf(_player) > 0, "Balance 0"); _activeHolders[_season][_player] = this.tokensOfOwner(_player); seasonOfHolder[_player] = _season; } else { require(seasonOfHolder[_player] != _season, "Player in season"); require(balanceOf(_player) > 0, "Balance 0"); seasonOfHolder[_player] = _season; bool found = false; for (uint i = 0; i < _seasonSnapshot[_season].length; i++) { if (_seasonSnapshot[_season][i] == _msgSender()) { found = true; break; } } if (!found) { _seasonSnapshot[_season].push(_msgSender()); } } emit PlayerAddedToSeason(_player, _season); } // One month or so, before season ends, we take a snapshot of the active Players for the season function setActiveSeasonSnapshot(uint256 _season) public onlyOwner { require(_season == currentSeason, "Wrong season"); for (uint i = 0; i < _seasonSnapshot[_season].length; i++) { address holder = _seasonSnapshot[_season][i]; uint256 balance = balanceOf(holder); if (balance > 0 && seasonOfHolder[holder] == _season) { _activeHolders[_season][holder] = this.tokensOfOwner(holder); _activeHoldersSeason[_season].push(holder); } } // We lock the season so no more players can join lockSeason(true); emit SetActiveSeasonSnapshot(_season); } // At the end of the season, we take a final snapshot of the active Players for the season function seasonEndActiveHoldersSnapshot(uint256 _season) public onlyOwner { require(_season == currentSeason, "Wrong season"); for (uint i = 0; i < _activeHoldersSeason[_season].length; i++) { address holder = _activeHoldersSeason[_season][i]; uint256 balance = balanceOf(holder); if (balance > 0 && seasonOfHolder[holder] == _season) { _finalHolders[_season][holder] = this.tokensOfOwner(holder); _finalHoldersSeason[_season].push(holder); } } // Season ended and winners are to be determined setSeasonEnd(true); emit SeasonEndActiveHoldersSnapshot(_season); } // Direct seasonal bance from all the direct minting or season fees function getBalanceForSeason(uint _season) public view returns (uint) { return seasonBalances[_season]; } // ********** PAY SEASON ********** // function paySeasonFee() public payable { uint256 seasonFeeInEth = calculateEntryFeeInEth(); require(lockedSeason == false, "Season locked"); require(balanceOf(_msgSender()) >= 1, "0 NFT"); require( seasonOfHolder[_msgSender()] != currentSeason, "Already paid season fee" ); require(msg.value >= seasonFeeInEth, "Not enough Ether"); seasonOfHolder[_msgSender()] = currentSeason; _seasonSnapshot[currentSeason].push(_msgSender()); seasonBalances[currentSeason] += seasonFeeInEth; emit SeasonFeePaid(_msgSender(), currentSeason, seasonFeeInEth); } // ********** PRICE ********** // // Get the latest ETH/USD price from Chainlink function getLatestEthUsdPrice() public view returns (int) { (, int price, , uint timeStamp, ) = priceFeed.latestRoundData(); // If the round is not complete yet, timestamp is 0 require(timeStamp > 0, "ERR"); return price; } // Set the ETH/USD price feed ADDRESS from Chainlink function setPriceFeed(address _newPriceFeed) public onlyOwner { require(_newPriceFeed != address(0), "Address !0"); emit PriceFeedChanged(address(priceFeed), _newPriceFeed); priceFeed = AggregatorV3Interface(_newPriceFeed); } // Set the entry fee for a season in USD function setSeasonEntryFeeInUsd(uint256 _newEntryFeeInUsd) public onlyOwner { require(_newEntryFeeInUsd > 0, "Fee <= 0"); emit SeasonEntryFeeChanged(entryFeeInUsd, _newEntryFeeInUsd); entryFeeInUsd = _newEntryFeeInUsd; } // Calculate the entry fee for a season in ETH function calculateEntryFeeInEth() public view returns (uint256) { int ethUsdPrice = getLatestEthUsdPrice(); require(ethUsdPrice > 0, "Feed error"); uint latestPriceWei = uint(uint(ethUsdPrice) / 1e8); return (entryFeeInUsd * 10 ** 18) / latestPriceWei; } // ********** COMMISSION ********** // // Set the owner commission percentage but no more than 30% function setOwnerCommission(uint _percentage) public onlyOwner { require(_percentage <= 30, "> 30"); ownerCommission = _percentage; emit SetOwnerCommission(_percentage); } // ********** OVERRIDES ********** // function _baseURI() internal view virtual override returns (string memory) { return uriPrefix; } // Keeping a meta record of the seasons via IPFS when seasons are finished, so they remain pernament function recordSeasonURI( uint256 _season, string memory _uri ) public onlyOwner { seasonRecordsURI[_season] = _uri; emit SetRecordSeasonURI(_season, _uri); } // Offical URIs for contract confirmation function setContractOfficialURIs( string memory _key, string memory _uri ) public onlyOwner { if ( keccak256(abi.encodePacked(officialURIs[_key])) == keccak256(abi.encodePacked("")) ) { keyRecords.push(_key); keyRecordsLength += 1; } officialURIs[_key] = _uri; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.19 <0.9.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract HOSWinnersSUB is Ownable, ReentrancyGuard { using Strings for uint256; uint public ownerCommission = 3; uint256 public currentSeason = 1; // *** EVENTS *** // event WithdrawFundsToNormalWinner( uint256 season, string class, address to, uint amount ); event WithdrawFundsToHardcoreWinner( uint256 season, string class, address to, uint amount ); event WithdrawFundsToTeamWinner(uint256 season, address to, uint amount); event OwnerCommissionWithdraw(address indexed to, uint amount); event SetClassWinnersNormalEvent( uint256 _season, string _class, address _firstPlace, address _secondPlace, address _thirdPlace ); event SetClassWinnersHardcoreEvent( uint256 _season, string _class, address _firstPlace, address _secondPlace, address _thirdPlace ); event SetTeamWinnersEvent( uint256 _season, Team _firstPlace, Team _secondPlace, Team _thirdPlace ); event SetClaimStatusNormalEvent( uint256 _season, string _class, address _winner ); event SetClaimStatusHardcoreEvent( uint256 _season, string _class, address _winner ); event SetClaimStatusTeamEvent(uint256 _season, address _winner); // Mapping from season number to balance mapping(uint => bool) public ownerPaySeason; // Define a struct for the winners of each class struct ClassWinners { address firstPlace; address secondPlace; address thirdPlace; } // Define a struct for the winners of each season struct SeasonWinners { ClassWinners barbarian; ClassWinners rogue; ClassWinners sorcerer; ClassWinners druid; ClassWinners necromancer; ClassWinners paladin; ClassWinners monk; ClassWinners amazon; ClassWinners vampire; ClassWinners demon; } // Define a struct for a team struct Team { address player1; address player2; address player3; address player4; } // Define a struct for the team winners struct TeamWinners { Team firstPlace; Team secondPlace; Team thirdPlace; } // season => class => winners mapping(uint256 => mapping(string => ClassWinners)) private _activeWinnersNormalSeason; mapping(uint256 => mapping(string => ClassWinners)) private _activeWinnersHardcoreSeason; // season => winners mapping(uint256 => TeamWinners) private _activeWinnersTeams; // season => class => address => bool mapping(uint256 => mapping(string => mapping(address => bool))) private _claimedNormalSeason; mapping(uint256 => mapping(string => mapping(address => bool))) private _claimedHardcoreSeason; // season => address => bool mapping(uint256 => mapping(address => bool)) private _claimedTeamsSeason; // ********** SEASON WINNERS NORMAL ********** // // Function to set the winners for a given class and season for Normal mode // @@@ _class bargarian, rogue, sorcerer, druid, necromancer, paladin, monk, amazon, vampire, demon function setClassWinnersNormal( uint256 _season, string memory _class, address _firstPlace, address _secondPlace, address _thirdPlace ) public onlyOwner { ClassWinners memory winners; winners.firstPlace = _firstPlace; winners.secondPlace = _secondPlace; winners.thirdPlace = _thirdPlace; _activeWinnersNormalSeason[_season][_class] = winners; emit SetClassWinnersNormalEvent( _season, _class, _firstPlace, _secondPlace, _thirdPlace ); } // Function to get the winners for a given class and season function getClassWinnersNormal( uint256 _season, string memory _class ) public view returns (address, address, address) { ClassWinners memory winners; winners = _activeWinnersNormalSeason[_season][_class]; return (winners.firstPlace, winners.secondPlace, winners.thirdPlace); } // Function to get all the winners for a season in Normal mode function getEveryNormalWinners( uint256 _season, string[] memory _classes ) public view returns (ClassWinners[] memory) { require( _activeWinnersNormalSeason[_season][_classes[0]].firstPlace != address(0), "Winners not set" ); ClassWinners[] memory winnersList = new ClassWinners[](_classes.length); for (uint i = 0; i < _classes.length; i++) { winnersList[i] = _activeWinnersNormalSeason[_season][_classes[i]]; } return winnersList; } // ********** SEASON WINNERS HARDCORE ********** // // Function to set the winners for a given class and season for Hardcore mode function setClassWinnersHardcore( uint256 _season, string memory _class, address _firstPlace, address _secondPlace, address _thirdPlace ) public onlyOwner { ClassWinners memory winners; winners.firstPlace = _firstPlace; winners.secondPlace = _secondPlace; winners.thirdPlace = _thirdPlace; _activeWinnersHardcoreSeason[_season][_class] = winners; emit SetClassWinnersHardcoreEvent( _season, _class, _firstPlace, _secondPlace, _thirdPlace ); } // Function to get the hardcore winners for a given class and season function getClassWinnersHardcore( uint256 _season, string memory _class ) public view returns (address, address, address) { ClassWinners memory winners; winners = _activeWinnersHardcoreSeason[_season][_class]; return (winners.firstPlace, winners.secondPlace, winners.thirdPlace); } // Function to get all the winners for a season in harcore mode function getEveryHardcoreWinners( uint256 _season, string[] memory _classes ) public view returns (ClassWinners[] memory) { require( _activeWinnersHardcoreSeason[_season][_classes[0]].firstPlace != address(0), "Winners not set" ); ClassWinners[] memory winnersList = new ClassWinners[](_classes.length); for (uint i = 0; i < _classes.length; i++) { winnersList[i] = _activeWinnersHardcoreSeason[_season][_classes[i]]; } return winnersList; } // Function to set the team winners for a season function setTeamWinners( uint256 _season, Team memory _firstPlace, Team memory _secondPlace, Team memory _thirdPlace ) public onlyOwner { TeamWinners memory winners; winners.firstPlace = _firstPlace; winners.secondPlace = _secondPlace; winners.thirdPlace = _thirdPlace; _activeWinnersTeams[_season] = winners; emit SetTeamWinnersEvent(_season, _firstPlace, _secondPlace, _thirdPlace); } // Function to get the team winners for a season function getTeamWinners( uint256 _season ) public view returns (Team memory, Team memory, Team memory) { TeamWinners memory winners = _activeWinnersTeams[_season]; return (winners.firstPlace, winners.secondPlace, winners.thirdPlace); } // Set claim status for normal season winner function setClaimStatusNormal( uint256 _season, string memory _class, address _winner ) public onlyOwner { _claimedNormalSeason[_season][_class][_winner] = true; emit SetClaimStatusNormalEvent(_season, _class, _winner); } // Get claim status for normal season winner function getClaimStatusNormal( uint256 _season, string memory _class, address _winner ) public view returns (bool) { return _claimedNormalSeason[_season][_class][_winner]; } // Set claim status for hardcore season winner function setClaimStatusHardcore( uint256 _season, string memory _class, address _winner ) public onlyOwner { _claimedHardcoreSeason[_season][_class][_winner] = true; emit SetClaimStatusHardcoreEvent(_season, _class, _winner); } // Get claim status for hardcore season winner function getClaimStatusHardcore( uint256 _season, string memory _class, address _winner ) public view returns (bool) { return _claimedHardcoreSeason[_season][_class][_winner]; } // Set claim status for team season winner function setClaimStatusTeam( uint256 _season, address _winner ) public onlyOwner { _claimedTeamsSeason[_season][_winner] = true; emit SetClaimStatusTeamEvent(_season, _winner); } // Get claim status for team season winner function getClaimStatusTeam( uint256 _season, address _winner ) public view returns (bool) { return _claimedTeamsSeason[_season][_winner]; } // Withdawing funds to winners of the season for all categories, normal, hardcore and team. function withdrawFundsToWinner( address payable _to, uint _amount, string memory _class, uint _season, uint _mode // 0 = normal, 1 = hardcore, 2 = team ) public onlyOwner nonReentrant { require(address(this).balance >= _amount, "Not enough funds"); require(_to != address(0), "Zero address invalid"); if (_mode == 0) { ( address firstPlace, address secondPlace, address thirdPlace ) = getClassWinnersNormal(_season, _class); require( _to == thirdPlace || _to == secondPlace || _to == firstPlace, "Not winner" ); require(!getClaimStatusNormal(_season, _class, _to), "Already claimed"); } else if (_mode == 1) { ( address firstPlace, address secondPlace, address thirdPlace ) = getClassWinnersHardcore(_season, _class); require( _to == thirdPlace || _to == secondPlace || _to == firstPlace, "Not winner" ); require(!getClaimStatusHardcore(_season, _class, _to), "Already claimed"); } else if (_mode == 2) { ( Team memory firstPlace, Team memory secondPlace, Team memory thirdPlace ) = getTeamWinners(_season); require( _to == firstPlace.player1 || _to == firstPlace.player2 || _to == firstPlace.player3 || _to == firstPlace.player4 || _to == secondPlace.player1 || _to == secondPlace.player2 || _to == secondPlace.player3 || _to == secondPlace.player4 || _to == thirdPlace.player1 || _to == thirdPlace.player2 || _to == thirdPlace.player3 || _to == thirdPlace.player4 || // check second and third place false, "Not winner" ); require(!getClaimStatusTeam(_season, _to), "Already claimed"); } else { revert("wrong mode"); } // Transfer the funds (bool success, ) = _to.call{value: _amount}(""); require(success, "Failed to send Ether"); if (_mode == 0) { setClaimStatusNormal(_season, _class, _to); emit WithdrawFundsToNormalWinner(_season, _class, _to, _amount); } else if (_mode == 1) { setClaimStatusHardcore(_season, _class, _to); emit WithdrawFundsToHardcoreWinner(_season, _class, _to, _amount); } else if (_mode == 2) { setClaimStatusTeam(_season, _to); emit WithdrawFundsToTeamWinner(_season, _to, _amount); } } // Withdrawing percentange from contract to a specified address by Owner, once per season function withdrawFundsForOwner( address payable _to ) public onlyOwner nonReentrant { uint contractBalance = address(this).balance; require(contractBalance > 0, "No funds"); require(_to != address(0), "invalid"); require(!ownerPaySeason[currentSeason], "Already paid"); uint ammount = (contractBalance * ownerCommission) / 100; (bool success, ) = _to.call{value: ammount}(""); require(success, "Failed"); ownerPaySeason[currentSeason] = true; emit OwnerCommissionWithdraw(_to, ammount); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmountPerTx","type":"uint256"},{"internalType":"address","name":"_priceFeed","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"AddPlayerToSeason","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isLocked","type":"bool"}],"name":"LockStateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"MaxSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"}],"name":"MintedForAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"OwnerCommissionWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PausedStateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"PlayerAddedToSeason","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"PlayerRemovedFromSeason","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPriceFeed","type":"address"},{"indexed":false,"internalType":"address","name":"newPriceFeed","type":"address"}],"name":"PriceFeedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldSeason","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newSeason","type":"uint256"}],"name":"SeasonChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"SeasonEndActiveHoldersSnapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"SeasonEndStateUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"SeasonEntryFeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"SeasonFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isLocked","type":"bool"}],"name":"SeasonLockedStateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"SetActiveSeasonSnapshot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"indexed":false,"internalType":"string","name":"_class","type":"string"},{"indexed":false,"internalType":"address","name":"_winner","type":"address"}],"name":"SetClaimStatusHardcoreEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"indexed":false,"internalType":"string","name":"_class","type":"string"},{"indexed":false,"internalType":"address","name":"_winner","type":"address"}],"name":"SetClaimStatusNormalEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"indexed":false,"internalType":"address","name":"_winner","type":"address"}],"name":"SetClaimStatusTeamEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"indexed":false,"internalType":"string","name":"_class","type":"string"},{"indexed":false,"internalType":"address","name":"_firstPlace","type":"address"},{"indexed":false,"internalType":"address","name":"_secondPlace","type":"address"},{"indexed":false,"internalType":"address","name":"_thirdPlace","type":"address"}],"name":"SetClassWinnersHardcoreEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"indexed":false,"internalType":"string","name":"_class","type":"string"},{"indexed":false,"internalType":"address","name":"_firstPlace","type":"address"},{"indexed":false,"internalType":"address","name":"_secondPlace","type":"address"},{"indexed":false,"internalType":"address","name":"_thirdPlace","type":"address"}],"name":"SetClassWinnersNormalEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percentage","type":"uint256"}],"name":"SetOwnerCommission","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetRecordSeasonURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_season","type":"uint256"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"indexed":false,"internalType":"struct HOSWinnersSUB.Team","name":"_firstPlace","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"indexed":false,"internalType":"struct HOSWinnersSUB.Team","name":"_secondPlace","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"indexed":false,"internalType":"struct HOSWinnersSUB.Team","name":"_thirdPlace","type":"tuple"}],"name":"SetTeamWinnersEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldPrefix","type":"string"},{"indexed":false,"internalType":"string","name":"newPrefix","type":"string"}],"name":"URIPrefixChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"oldSuffix","type":"string"},{"indexed":false,"internalType":"string","name":"newSuffix","type":"string"}],"name":"URISuffixChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"string","name":"class","type":"string"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFundsToHardcoreWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"string","name":"class","type":"string"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFundsToNormalWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFundsToTeamWinner","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_activeHolders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_activeHoldersSeason","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_finalHolders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_finalHoldersSeason","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_seasonSnapshot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"},{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"addPlayerToSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateEntryFeeInEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entryFeeInUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getActiveSeasonPlayers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getBalanceForSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_winner","type":"address"}],"name":"getClaimStatusHardcore","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_winner","type":"address"}],"name":"getClaimStatusNormal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"address","name":"_winner","type":"address"}],"name":"getClaimStatusTeam","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"}],"name":"getClassWinnersHardcore","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"}],"name":"getClassWinnersNormal","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string[]","name":"_classes","type":"string[]"}],"name":"getEveryHardcoreWinners","outputs":[{"components":[{"internalType":"address","name":"firstPlace","type":"address"},{"internalType":"address","name":"secondPlace","type":"address"},{"internalType":"address","name":"thirdPlace","type":"address"}],"internalType":"struct HOSWinnersSUB.ClassWinners[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string[]","name":"_classes","type":"string[]"}],"name":"getEveryNormalWinners","outputs":[{"components":[{"internalType":"address","name":"firstPlace","type":"address"},{"internalType":"address","name":"secondPlace","type":"address"},{"internalType":"address","name":"thirdPlace","type":"address"}],"internalType":"struct HOSWinnersSUB.ClassWinners[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getFinalSeasonPlayers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getHoldersForSeason","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestEthUsdPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"getPlayerSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"getTeamWinners","outputs":[{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"address","name":"_holder","type":"address"}],"name":"isActiveHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"uint256","name":"_season","type":"uint256"},{"internalType":"address","name":"_holder","type":"address"}],"name":"isFinalHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"isPlayerInSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"keyRecords","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyRecordsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_stateLocked","type":"bool"}],"name":"lockSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockedSeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedSupply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmountPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"mintForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"officialURIs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerCommission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerPaySeason","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paySeasonFee","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"recordSeasonURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"},{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"removePlayerFromSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"seasonEndActiveHoldersSnapshot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seasonEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"seasonOfHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonRecordsURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"setActiveSeasonSnapshot","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":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_winner","type":"address"}],"name":"setClaimStatusHardcore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_winner","type":"address"}],"name":"setClaimStatusNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"address","name":"_winner","type":"address"}],"name":"setClaimStatusTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_firstPlace","type":"address"},{"internalType":"address","name":"_secondPlace","type":"address"},{"internalType":"address","name":"_thirdPlace","type":"address"}],"name":"setClassWinnersHardcore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"address","name":"_firstPlace","type":"address"},{"internalType":"address","name":"_secondPlace","type":"address"},{"internalType":"address","name":"_thirdPlace","type":"address"}],"name":"setClassWinnersNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_key","type":"string"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractOfficialURIs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"}],"name":"setCurrentSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_lock","type":"bool"}],"name":"setLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintAmountPerTx","type":"uint256"}],"name":"setMaxMintAmountPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setOwnerCommission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newPriceFeed","type":"address"}],"name":"setPriceFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setSeasonEnd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newEntryFeeInUsd","type":"uint256"}],"name":"setSeasonEntryFeeInUsd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_season","type":"uint256"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"_firstPlace","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"_secondPlace","type":"tuple"},{"components":[{"internalType":"address","name":"player1","type":"address"},{"internalType":"address","name":"player2","type":"address"},{"internalType":"address","name":"player3","type":"address"},{"internalType":"address","name":"player4","type":"address"}],"internalType":"struct HOSWinnersSUB.Team","name":"_thirdPlace","type":"tuple"}],"name":"setTeamWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriPrefix","type":"string"}],"name":"setUriPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriSuffix","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriPrefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uriSuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawFundsForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_class","type":"string"},{"internalType":"uint256","name":"_season","type":"uint256"},{"internalType":"uint256","name":"_mode","type":"uint256"}],"name":"withdrawFundsToWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60036002819055600190556013805461ffff60a01b19169055603260145560a06040525f608090815260159062000037908262000274565b50604080518082019091526005815264173539b7b760d91b602082015260169062000063908262000274565b506019805461ffff191660011790555f601b5534801562000082575f80fd5b506040516200633838038062006338833981016040819052620000a591620003e6565b8484620000b23362000116565b60018055600d620000c4838262000274565b50600e620000d3828262000274565b506001600b5550506017839055620000eb8262000165565b601380546001600160a01b0319166001600160a01b0392909216919091179055506200048192505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6200016f62000174565b601855565b5f546001600160a01b03163314620001d25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b634e487b7160e01b5f52604160045260245ffd5b600181811c90821680620001fd57607f821691505b6020821081036200021c57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200026f575f81815260208120601f850160051c810160208610156200024a5750805b601f850160051c820191505b818110156200026b5782815560010162000256565b5050505b505050565b81516001600160401b03811115620002905762000290620001d4565b620002a881620002a18454620001e8565b8462000222565b602080601f831160018114620002de575f8415620002c65750858301515b5f19600386901b1c1916600185901b1785556200026b565b5f85815260208120601f198616915b828110156200030e57888601518255948401946001909101908401620002ed565b50858210156200032c57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f82601f8301126200034c575f80fd5b81516001600160401b0380821115620003695762000369620001d4565b604051601f8301601f19908116603f01168101908282118183101715620003945762000394620001d4565b81604052838152602092508683858801011115620003b0575f80fd5b5f91505b83821015620003d35785820183015181830184015290820190620003b4565b5f93810190920192909252949350505050565b5f805f805f60a08688031215620003fb575f80fd5b85516001600160401b038082111562000412575f80fd5b6200042089838a016200033c565b9650602088015191508082111562000436575f80fd5b5062000445888289016200033c565b6040880151606089015160808a0151929750909550935090506001600160a01b038116811462000473575f80fd5b809150509295509295909350565b615ea9806200048f5f395ff3fe6080604052600436106104df575f3560e01c8063724e78da11610283578063b2030c2511610155578063ca5c7b91116100c9578063e96a38bf11610083578063e96a38bf14610fc6578063e985e9c514610fe5578063efbd73f41461102c578063f2fde38b1461104b578063f71da8eb1461106a578063fb753fff14611098575f80fd5b8063ca5c7b9114610f17578063d4bdf10a14610f35578063d5abeb0114610f54578063d71b03af14610f69578063dbfd13f014610f88578063e06d940914610fa7575f80fd5b8063be388c0b1161011a578063be388c0b14610e4f578063bf8fe30814610e6e578063bfa6b4ff14610e76578063c051754914610ea1578063c23dc68f14610ecc578063c87b56dd14610ef8575f80fd5b8063b2030c2514610dca578063b2965d0614610de9578063b88d4fde14610e08578063bc28e89014610e1b578063bcb3962114610e3a575f80fd5b806394864c5c116101f7578063a22cb465116101b1578063a22cb46514610d04578063a65731f814610d23578063aadd546f14610d42578063af69ff3314610d61578063b071401b14610d8c578063b0ce388b14610dab575f80fd5b806394864c5c14610c6157806395d89b4114610c8057806398656a9f14610c94578063992017c214610cb357806399a2557a14610cd2578063a0712d6814610cf1575f80fd5b80637ec4a659116102485780637ec4a65914610bb457806382ea39ee14610bd3578063838f4fdb14610bf25780638462151c14610c115780638da5cb5b14610c3057806394354fd014610c4c575f80fd5b8063724e78da14610aef578063741596f314610b0e578063757dd25614610b2d57806377822d2614610b7657806379b2638e14610b95575f80fd5b80633f541e07116103bc57806362b99ad41161033057806369f615b6116102ea57806369f615b614610a1a5780636ac8d2e414610a5e5780636c33008214610a7e5780636f8b44b014610a9d57806370a0823114610abc578063715018a614610adb575f80fd5b806362b99ad4146109555780636352211e1461096957806364697b2b1461098857806366e885df146109a757806366eb623e146109c6578063676f6056146109e6575f80fd5b80635503a0e8116103815780635503a0e81461088357806355e441f014610897578063563cac5a146108b65780635bbb2177146108e25780635c975abb1461090e5780635d55c36714610927575f80fd5b80633f541e07146107f257806342842e0e146108065780634328b89214610819578063440330d014610845578063487ab45a14610864575f80fd5b80631ff3c18b1161045357806329fa1cb71161041857806329fa1cb71461074d5780632dfbc546146107625780633021459914610781578063356eb9031461079557806339e211c9146107b45780633e615e6c146107d3575f80fd5b80631ff3c18b146106c8578063211e28b6146106dd57806321606f16146106fc57806322a3e8ca1461071b57806323b872dd1461073a575f80fd5b80630fb04612116104a45780630fb0461214610608578063118934cc1461062757806314620b5b1461064a57806316ba10e01461067657806316c38b3c1461069557806318160ddd146106b4575f80fd5b806301ffc9a714610548578063053f12661461057c57806306fdde031461059d578063081812fc146105be578063095ea7b3146105f5575f80fd5b3661054457604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a16003545f908152601c60205260408120805434929061053c908490614f44565b925050819055005b5f80fd5b348015610553575f80fd5b50610567610562366004614f6c565b6110b7565b60405190151581526020015b60405180910390f35b348015610587575f80fd5b5061059b610596366004614f9b565b611108565b005b3480156105a8575f80fd5b506105b161116c565b6040516105739190615001565b3480156105c9575f80fd5b506105dd6105d8366004615013565b6111fc565b6040516001600160a01b039091168152602001610573565b61059b61060336600461503e565b61123e565b348015610613575f80fd5b5061059b61062236600461511e565b6112dc565b348015610632575f80fd5b5061063c60025481565b604051908152602001610573565b348015610655575f80fd5b50610669610664366004615013565b6113c2565b604051610573919061517d565b348015610681575f80fd5b5061059b6106903660046151bd565b61142b565b3480156106a0575f80fd5b5061059b6106af366004614f9b565b611472565b3480156106bf575f80fd5b5061063c6114c1565b3480156106d3575f80fd5b5061063c60145481565b3480156106e8575f80fd5b5061059b6106f7366004614f9b565b6114ce565b348015610707575f80fd5b50610669610716366004615013565b611574565b348015610726575f80fd5b5061059b610735366004615013565b6115db565b61059b6107483660046151ee565b6117c6565b348015610758575f80fd5b5061063c601b5481565b34801561076d575f80fd5b5061059b61077c36600461522c565b611957565b34801561078c575f80fd5b5061063c6119f1565b3480156107a0575f80fd5b5061059b6107af366004615282565b611aaa565b3480156107bf575f80fd5b5061059b6107ce366004615013565b611b07565b3480156107de575f80fd5b5061063c6107ed3660046152bb565b611b9d565b3480156107fd575f80fd5b5061063c611bd2565b61059b6108143660046151ee565b611c53565b348015610824575f80fd5b50610838610833366004615301565b611c6d565b60405161057391906153bc565b348015610850575f80fd5b5061059b61085f36600461503e565b611e1d565b34801561086f575f80fd5b5061059b61087e366004615423565b612011565b34801561088e575f80fd5b506105b16121fe565b3480156108a2575f80fd5b5061059b6108b136600461543e565b61228a565b3480156108c1575f80fd5b506108d56108d03660046154a3565b612830565b60405161057391906154d1565b3480156108ed575f80fd5b506109016108fc366004615508565b61289f565b60405161057391906155b2565b348015610919575f80fd5b506019546105679060ff1681565b348015610932575f80fd5b50610946610941366004615013565b612966565b60405161057393929190615626565b348015610960575f80fd5b506105b1612a8a565b348015610974575f80fd5b506105dd610983366004615013565b612a97565b348015610993575f80fd5b506105b16109a23660046151bd565b612aa1565b3480156109b2575f80fd5b506105dd6109c1366004615650565b612ac5565b3480156109d1575f80fd5b5060135461056790600160a81b900460ff1681565b3480156109f1575f80fd5b5061063c610a00366004615423565b6001600160a01b03165f908152601d602052604090205490565b348015610a25575f80fd5b50610567610a343660046154a3565b5f918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610a69575f80fd5b5060135461056790600160a01b900460ff1681565b348015610a89575f80fd5b506105b1610a98366004615013565b612af9565b348015610aa8575f80fd5b5061059b610ab7366004615013565b612b11565b348015610ac7575f80fd5b5061063c610ad6366004615423565b612ba3565b348015610ae6575f80fd5b5061059b612bef565b348015610afa575f80fd5b5061059b610b09366004615423565b612c02565b348015610b19575f80fd5b50610669610b28366004615013565b612cb6565b348015610b38575f80fd5b50610b4c610b47366004615282565b612d1d565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610573565b348015610b81575f80fd5b506105dd610b90366004615650565b612da8565b348015610ba0575f80fd5b5061059b610baf3660046154a3565b612dc1565b348015610bbf575f80fd5b5061059b610bce3660046151bd565b612e2c565b348015610bde575f80fd5b50610567610bed366004615423565b612e73565b348015610bfd575f80fd5b5061059b610c0c366004615013565b612f82565b348015610c1c575f80fd5b506108d5610c2b366004615423565b612ff9565b348015610c3b575f80fd5b505f546001600160a01b03166105dd565b348015610c57575f80fd5b5061063c60185481565b348015610c6c575f80fd5b5061059b610c7b366004615013565b6130fd565b348015610c8b575f80fd5b506105b1613180565b348015610c9f575f80fd5b5061059b610cae366004614f9b565b61318f565b348015610cbe575f80fd5b5061059b610ccd3660046156f6565b6131f7565b348015610cdd575f80fd5b506108d5610cec366004615745565b6133e9565b61059b610cff366004615013565b613569565b348015610d0f575f80fd5b5061059b610d1e366004615777565b613855565b348015610d2e575f80fd5b50610838610d3d366004615301565b6138c0565b348015610d4d575f80fd5b506108d5610d5c3660046154a3565b613a68565b348015610d6c575f80fd5b5061063c610d7b366004615423565b601d6020525f908152604090205481565b348015610d97575f80fd5b5061059b610da6366004615013565b613ad7565b348015610db6575f80fd5b5061059b610dc536600461522c565b613ae4565b348015610dd5575f80fd5b506105dd610de4366004615650565b613b71565b348015610df4575f80fd5b50610567610e0336600461522c565b613b8a565b61059b610e163660046157aa565b613bd7565b348015610e26575f80fd5b5061063c610e353660046152bb565b613c21565b348015610e45575f80fd5b5061063c60035481565b348015610e5a575f80fd5b5061059b610e69366004615013565b613c44565b61059b613e2d565b348015610e81575f80fd5b5061063c610e90366004615013565b5f908152601c602052604090205490565b348015610eac575f80fd5b5061063c610ebb366004615013565b601c6020525f908152604090205481565b348015610ed7575f80fd5b50610eeb610ee6366004615013565b614009565b6040516105739190615824565b348015610f03575f80fd5b506105b1610f12366004615013565b61408f565b348015610f22575f80fd5b5060195461056790610100900460ff1681565b348015610f40575f80fd5b5061059b610f4f366004615832565b61412c565b348015610f5f575f80fd5b5061063c60175481565b348015610f74575f80fd5b50610b4c610f83366004615282565b61421a565b348015610f93575f80fd5b50610567610fa236600461522c565b614255565b348015610fb2575f80fd5b506105b1610fc1366004615013565b614270565b348015610fd1575f80fd5b5061059b610fe0366004615832565b614297565b348015610ff0575f80fd5b50610567610fff3660046158ad565b6001600160a01b039182165f90815260126020908152604080832093909416825291909152205460ff1690565b348015611037575f80fd5b5061059b6110463660046154a3565b614375565b348015611056575f80fd5b5061059b611065366004615423565b614478565b348015611075575f80fd5b50610567611084366004615013565b60046020525f908152604090205460ff1681565b3480156110a3575f80fd5b5061059b6110b236600461503e565b6144ee565b5f6301ffc9a760e01b6001600160e01b0319831614806110e757506380ac58cd60e01b6001600160e01b03198316145b806111025750635b5e139f60e01b6001600160e01b03198316145b92915050565b611110614892565b6013805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f20683884310c950f2723f8aa6b7c55b74fe0a09f03ebf4d4bc5acdcd7a419f3a906020015b60405180910390a150565b6060600d805461117b906158d9565b80601f01602080910402602001604051908101604052809291908181526020018280546111a7906158d9565b80156111f25780601f106111c9576101008083540402835291602001916111f2565b820191905f5260205f20905b8154815290600101906020018083116111d557829003601f168201915b5050505050905090565b5f611206826148eb565b611223576040516333d1c03960e21b815260040160405180910390fd5b505f908152601160205260409020546001600160a01b031690565b5f61124882612a97565b9050336001600160a01b03821614611281576112648133610fff565b611281576040516367d9dca160e11b815260040160405180910390fd5b5f8281526011602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6112e4614892565b604080515f815260208101918290525181209060249061130590859061590b565b90815260200160405180910390206040516020016113239190615995565b604051602081830303815290604052805190602001200361139257601a80546001810182555f919091527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e0161137983826159e5565b506001601b5f82825461138c9190614f44565b90915550505b806024836040516113a3919061590b565b908152602001604051809103902090816113bd91906159e5565b505050565b5f8181526022602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611401575b50505050509050919050565b611433614892565b601661143f82826159e5565b507f1ac6f3d53715a749e1ae8dab4eac30a61355daa3dec365a0c916f6e0be18ee05601682604051611161929190615aa0565b61147a614892565b6019805460ff191682151590811790915560405160ff909116151581527fa9bfed3d98385b3777389e321dbde773cf7d335fa604fefbae3dca93564f558690602001611161565b600c54600b54035f190190565b6114d6614892565b601954610100900460ff16156115235760405162461bcd60e51b815260206004820152600d60248201526c14dd5c1c1b1e481b1bd8dad959609a1b60448201526064015b60405180910390fd5b6019805461ff0019166101008315158102919091179182905560405160ff9190920416151581527f770fc13e7d1ebb2c22208be39268bda6859dd047d6bf945392aee26aab1cc77c90602001611161565b5f8181526021602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116114015750505050509050919050565b6115e3614892565b60035481146116235760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b604482015260640161151a565b5f5b5f828152601e602052604090205481101561178b575f828152601e6020526040812080548390811061165957611659615b3a565b5f9182526020822001546001600160a01b0316915061167782612ba3565b90505f8111801561169e57506001600160a01b0382165f908152601d602052604090205484145b1561177657604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156116e4573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261170b9190810190615b4e565b5f858152601f602090815260408083206001600160a01b03871684528252909120825161173e9391929190910190614ebc565b505f8481526021602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b5050808061178390615bd9565b915050611625565b50611796600161318f565b6040518181527f840b10a8e21e1ddc3c6028054db7a94117e719acc8c5bac0542c693151d35d7090602001611161565b5f6117d08261491e565b9050836001600160a01b0316816001600160a01b0316146118035760405162a1148160e81b815260040160405180910390fd5b5f8281526011602052604090208054338082146001600160a01b0388169091141761184f576118328633610fff565b61184f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661187657604051633a954ecd60e21b815260040160405180910390fd5b8015611880575f82555b6001600160a01b038681165f9081526010602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f858152600f6020526040812091909155600160e11b8416900361190d57600184015f818152600f6020526040812054900361190b57600b54811461190b575f818152600f602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b61195f614892565b600160085f8581526020019081526020015f2083604051611980919061590b565b90815260408051602092819003830181206001600160a01b0386165f90815293529120805460ff1916921515929092179091557fcc9a19295158baf2152ed4e27dc5598749ccd51d8c10bbda2a83dc9aabf0defa906119e490859085908590615bf1565b60405180910390a1505050565b5f805f60135f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611a44573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a689190615c3a565b509350509250505f8111611aa45760405162461bcd60e51b815260206004820152600360248201526222a92960e91b604482015260640161151a565b50919050565b611ab2614892565b5f828152602360205260409020611ac982826159e5565b507f92e9ffddeaa74e310937d5ea9dc0b00dab9e3efce2bc47e91b8bc6ee41c98bf48282604051611afb929190615c86565b60405180910390a15050565b611b0f614892565b6003548111611b4d5760405162461bcd60e51b815260206004820152600a60248201526910b3ba1039b2b0b9b7b760b11b604482015260640161151a565b6003819055611b5b5f61318f565b611b645f611108565b60035460408051918252602082018390527fc10fb081607c5cd4f8580ca12696f39a0212fc426b51a19e521fd4611008f1119101611161565b60208052825f5260405f20602052815f5260405f208181548110611bbf575f80fd5b905f5260205f20015f9250925050505481565b5f80611bdc6119f1565b90505f8113611c1a5760405162461bcd60e51b815260206004820152600a6024820152692332b2b21032b93937b960b11b604482015260640161151a565b5f611c296305f5e10083615c9e565b905080601454670de0b6b3a7640000611c429190615cbd565b611c4c9190615c9e565b9250505090565b6113bd83838360405180602001604052805f815250613bd7565b5f8281526006602052604081208251606092919084908390611c9157611c91615b3a565b6020026020010151604051611ca6919061590b565b908152604051908190036020019020546001600160a01b031603611cfe5760405162461bcd60e51b815260206004820152600f60248201526e15da5b9b995c9cc81b9bdd081cd95d608a1b604482015260640161151a565b5f82516001600160401b03811115611d1857611d18615068565b604051908082528060200260200182016040528015611d6157816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181611d365790505b5090505f5b8351811015611e15575f8581526006602052604090208451859083908110611d9057611d90615b3a565b6020026020010151604051611da5919061590b565b90815260408051918290036020908101832060608401835280546001600160a01b03908116855260018201548116928501929092526002015416908201528251839083908110611df757611df7615b3a565b60200260200101819052508080611e0d90615bd9565b915050611d66565b509392505050565b611e25614892565b601354600160a81b900460ff1615611ed8575f818152602080805260408083206001600160a01b0386168452909152902054611e935760405162461bcd60e51b815260206004820152600d60248201526c2737ba1034b71039b2b0b9b7b760991b604482015260640161151a565b5f818152602080805260408083206001600160a01b03861684529091528120611ebb91614f05565b6001600160a01b0382165f908152601d6020526040812055611fd2565b601354600160a01b900460ff1615611f72575f818152601f602090815260408083206001600160a01b0386168452909152902054611f485760405162461bcd60e51b815260206004820152600d60248201526c2737ba1034b71039b2b0b9b7b760991b604482015260640161151a565b5f818152601f602090815260408083206001600160a01b03861684529091528120611ebb91614f05565b5f818152601e6020526040902054611fb95760405162461bcd60e51b815260206004820152600a6024820152694e6f20706c617965727360b01b604482015260640161151a565b6001600160a01b0382165f908152601d60205260408120555b604080516001600160a01b0384168152602081018390527f515d7b15fe0a74980600135c872fe8534a6c86f99cbf6a8eae00dcf00f2a26d09101611afb565b612019614892565b612021614988565b478061205a5760405162461bcd60e51b81526020600482015260086024820152674e6f2066756e647360c01b604482015260640161151a565b6001600160a01b03821661209a5760405162461bcd60e51b81526020600482015260076024820152661a5b9d985b1a5960ca1b604482015260640161151a565b6003545f9081526004602052604090205460ff16156120ea5760405162461bcd60e51b815260206004820152600c60248201526b105b1c9958591e481c185a5960a21b604482015260640161151a565b5f6064600254836120fb9190615cbd565b6121059190615c9e565b90505f836001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612150576040519150601f19603f3d011682016040523d82523d5f602084013e612155565b606091505b505090508061218f5760405162461bcd60e51b815260206004820152600660248201526511985a5b195960d21b604482015260640161151a565b6003545f9081526004602052604090819020805460ff19166001179055516001600160a01b038516907f111d3d894a05740f87707f03ee588f9de29ccb6a030e8c953b37405d48f08816906121e79085815260200190565b60405180910390a25050506121fb60018055565b50565b6016805461220b906158d9565b80601f0160208091040260200160405190810160405280929190818152602001828054612237906158d9565b80156122825780601f1061225957610100808354040283529160200191612282565b820191905f5260205f20905b81548152906001019060200180831161226557829003601f168201915b505050505081565b612292614892565b61229a614988565b834710156122dd5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b604482015260640161151a565b6001600160a01b03851661232a5760405162461bcd60e51b815260206004820152601460248201527316995c9bc81859191c995cdcc81a5b9d985b1a5960621b604482015260640161151a565b805f036123ff575f805f61233e858761421a565b925092509250806001600160a01b0316886001600160a01b031614806123755750816001600160a01b0316886001600160a01b0316145b806123915750826001600160a01b0316886001600160a01b0316145b6123ad5760405162461bcd60e51b815260040161151a90615cd4565b6123b885878a613b8a565b156123f75760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161151a565b505050612691565b8060010361248e575f805f6124148587612d1d565b925092509250806001600160a01b0316886001600160a01b0316148061244b5750816001600160a01b0316886001600160a01b0316145b806124675750826001600160a01b0316886001600160a01b0316145b6124835760405162461bcd60e51b815260040161151a90615cd4565b6123b885878a614255565b8060020361265c575f805f6124a285612966565b925092509250825f01516001600160a01b0316886001600160a01b031614806124e0575082602001516001600160a01b0316886001600160a01b0316145b80612500575082604001516001600160a01b0316886001600160a01b0316145b80612520575082606001516001600160a01b0316886001600160a01b0316145b80612537575081516001600160a01b038981169116145b80612557575081602001516001600160a01b0316886001600160a01b0316145b80612577575081604001516001600160a01b0316886001600160a01b0316145b80612597575081606001516001600160a01b0316886001600160a01b0316145b806125ae575080516001600160a01b038981169116145b806125ce575080602001516001600160a01b0316886001600160a01b0316145b806125ee575080604001516001600160a01b0316886001600160a01b0316145b8061260e575080606001516001600160a01b0316886001600160a01b0316145b8061261657505f5b6126325760405162461bcd60e51b815260040161151a90615cd4565b5f858152600a602090815260408083206001600160a01b038c16845290915290205460ff166123b8565b60405162461bcd60e51b815260206004820152600a60248201526977726f6e67206d6f646560b01b604482015260640161151a565b5f856001600160a01b0316856040515f6040518083038185875af1925050503d805f81146126da576040519150601f19603f3d011682016040523d82523d5f602084013e6126df565b606091505b50509050806127275760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161151a565b815f0361277b57612739838588611957565b7fea1db41ef3331dbde41f3474a1e9aef1b9edb0ed37f281a21dd7c2414da0d13c8385888860405161276e9493929190615cf8565b60405180910390a161281f565b816001036127c35761278e838588613ae4565b7f1c7df26c32ef0d46644941eeb2cc748b2df0de2243a5043683badcc0d32bfb628385888860405161276e9493929190615cf8565b8160020361281f576127d58387612dc1565b604080518481526001600160a01b03881660208201529081018690527fa10cd7d468bc91ddabd904aec5542b141aa603688a7010dc3c2035d5c51a99619060600160405180910390a15b5061282960018055565b5050505050565b5f828152602080805260408083206001600160a01b038516845282529182902080548351818402810184019094528084526060939283018282801561289257602002820191905f5260205f20905b81548152602001906001019080831161287e575b5050505050905092915050565b6060815f816001600160401b038111156128bb576128bb615068565b60405190808252806020026020018201604052801561290b57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f199092019101816128d95790505b5090505f5b82811461295d5761293886868381811061292c5761292c615b3a565b90506020020135614009565b82828151811061294a5761294a615b3a565b6020908102919091010152600101612910565b50949350505050565b60408051608080820183525f80835260208084018290528385018290526060938401829052845180840186528281528082018390528086018390528401829052845180840186528281528082018390528086018390528401829052948152600780865290849020845160e08101865281546001600160a01b0390811682870190815260018401548216838701526002840154821660a08401526003840154821660c084015282528651808601885260048401548216815260058401548216818a0152600684015482168189015293830154811684870152818801938452865194850187526008830154811685526009830154811697850197909752600a820154871684870152600b9091015490951692820192909252918301829052915191519192565b6015805461220b906158d9565b5f6111028261491e565b80516020818301810180516024825292820191909301209152805461220b906158d9565b6022602052815f5260405f208181548110612ade575f80fd5b5f918252602090912001546001600160a01b03169150829050565b60236020525f90815260409020805461220b906158d9565b612b19614892565b601954610100900460ff1615612b615760405162461bcd60e51b815260206004820152600d60248201526c14dd5c1c1b1e481b1bd8dad959609a1b604482015260640161151a565b60178190557fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b5612b8f6114c1565b604080519182526020820184905201611161565b5f6001600160a01b038216612bcb576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152601060205260409020546001600160401b031690565b612bf7614892565b612c005f6149e1565b565b612c0a614892565b6001600160a01b038116612c4d5760405162461bcd60e51b815260206004820152600a6024820152690416464726573732021360b41b604482015260640161151a565b601354604080516001600160a01b03928316815291831660208301527ff41a3b1d02012f65ae0013b820b751937676e06fe15550a1841ad88825d0b0dd910160405180910390a1601380546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152601e602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116114015750505050509050919050565b604080516060810182525f80825260208201819052918101829052819081905f86815260066020526040908190209051612d5890879061590b565b908152604080516020928190038301812060608201835280546001600160a01b03908116808452600183015482169584018690526002909201541691909201819052909891975095509350505050565b601e602052815f5260405f208181548110612ade575f80fd5b612dc9614892565b5f828152600a602090815260408083206001600160a01b03851680855290835292819020805460ff191660011790558051858152918201929092527f13cba76f63b6f3be76386be2c5d7e42b0ca5ae14fc2a73794b41ab8a5d211dc09101611afb565b612e34614892565b6015612e4082826159e5565b507f2ed2020dff3b323b7cfdc5a6377cf8ca1853e7196b70d0c5785290362202e4e8601582604051611161929190615aa0565b6013545f90600160a81b900460ff1615612ee8576003546001600160a01b0383165f908152601d6020526040902054148015612ed057506003545f908152602080805260408083206001600160a01b038616845290915290205415155b801561110257505f612ee183612ba3565b1192915050565b601354600160a01b900460ff1615612f55576003546001600160a01b0383165f908152601d6020526040902054148015612ed057506003545f908152601f602090815260408083206001600160a01b03861684529091529020541515801561110257505f612ee183612ba3565b6003546001600160a01b0383165f908152601d602052604090205414801561110257505f612ee183612ba3565b612f8a614892565b601e811115612fc45760405162461bcd60e51b815260040161151a9060208082526004908201526303e2033360e41b604082015260600190565b60028190556040518181527f566d8bfc8fe0c7e33a876501a7215286a812e1da6a33035eeee1c776dbad118390602001611161565b60605f805f61300785612ba3565b90505f816001600160401b0381111561302257613022615068565b60405190808252806020026020018201604052801561304b578160200160208202803683370190505b509050613077604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146130f15761308a81614a30565b915081604001516130e95781516001600160a01b0316156130aa57815194505b876001600160a01b0316856001600160a01b0316036130e957808387806001019850815181106130dc576130dc615b3a565b6020026020010181815250505b60010161307a565b50909695505050505050565b613105614892565b5f811161313f5760405162461bcd60e51b81526020600482015260086024820152670466565203c3d20360c41b604482015260640161151a565b60145460408051918252602082018390527f7ca8990c1cd963d0dde430d732306d8718e4e2bb28b1a8e9bab98f5f4f9fdf23910160405180910390a1601455565b6060600e805461117b906158d9565b613197614892565b6013805460ff60a01b1916600160a01b831515810291909117918290556003546040805191825260ff9290930491909116151560208201527f5f36fa90cde6e49fa7bc75d78d9ed2ccc1d0793e7073eb45de898405533649b99101611161565b6131ff614892565b61327c6040805160e081019091525f606082018181526080830182905260a0830182905260c083019190915281908152604080516080810182525f808252602082810182905292820181905260608201529101908152604080516080810182525f8082526020828101829052928201819052606082015291015290565b838152602080820184815260408084018581525f8981526007808652908390208651805182546001600160a01b03199081166001600160a01b039283161784558289015160018501805483169184169190911790558287015160028501805483169184169190911790556060928301516003850180548316918416919091179055965180516004850180548a16918416919091179055808901516005850180548a16918416919091179055808701516006850180548a16918416919091179055820151938301805488169482169490941790935592518051600883018054881691851691909117905595860151600982018054871691841691909117905585840151600a8201805487169184169190911790559490910151600b90940180549093169316929092179055517f3f6be6ecf27b70c47cce9bb5e0025d1504a236f5930ebc3d49012bf666c93f1d906133da908790879087908790615d2c565b60405180910390a15050505050565b606081831061340b57604051631960ccad60e11b815260040160405180910390fd5b5f80613416600b5490565b9050600185101561342657600194505b80841115613432578093505b5f61343c87612ba3565b90508486101561345b5785850381811015613455578091505b5061345e565b505f5b5f816001600160401b0381111561347757613477615068565b6040519080825280602002602001820160405280156134a0578160200160208202803683370190505b509050815f036134b557935061356292505050565b5f6134bf88614009565b90505f81604001516134cf575080515b885b8881141580156134e15750848714155b15613556576134ef81614a30565b9250826040015161354e5782516001600160a01b03161561350f57825191505b8a6001600160a01b0316826001600160a01b03160361354e578084888060010199508151811061354157613541615b3a565b6020026020010181815250505b6001016134d1565b50505092835250909150505b9392505050565b805f8111801561357b57506018548111155b6135b85760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015260640161151a565b601754816135c46114c1565b6135ce9190614f44565b11156136095760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b604482015260640161151a565b815f613613611bd2565b905061361f8183615cbd565b3410156136605760405162461bcd60e51b815260206004820152600f60248201526e446566696369656e742066756e647360881b604482015260640161151a565b60195460ff16156136a45760405162461bcd60e51b815260206004820152600e60248201526d135a5b9d081a5cc81c185d5cd95960921b604482015260640161151a565b6136ad33612e73565b80156136c25750601354600160a01b900460ff165b156136f85760405162461bcd60e51b81526020600482015260066024820152651b1bd8dad95960d21b604482015260640161151a565b6013545f90600160a01b900460ff16613711575f613714565b60015b60ff1690505f816003546137289190614f44565b90506137343387614a6a565b335f908152601d60205260408120829055805b5f838152601e60205260409020548110156137b2575f838152601e6020526040902080543391908390811061377e5761377e615b3a565b5f918252602090912001546001600160a01b0316036137a057600191506137b2565b806137aa81615bd9565b915050613747565b50806137e6575f828152601e602090815260408220805460018101825590835291200180546001600160a01b031916331790555b5f828152601c602052604081208054349290613803908490614f44565b909155503390507f25b428dfde728ccfaddad7e29e4ac23c24ed7fd1a6e3e3f91894a9a073f5dfff886138346114c1565b6040805192835260208301919091520160405180910390a250505050505050565b335f8181526012602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f82815260056020526040812082516060929190849083906138e4576138e4615b3a565b60200260200101516040516138f9919061590b565b908152604051908190036020019020546001600160a01b0316036139515760405162461bcd60e51b815260206004820152600f60248201526e15da5b9b995c9cc81b9bdd081cd95d608a1b604482015260640161151a565b5f82516001600160401b0381111561396b5761396b615068565b6040519080825280602002602001820160405280156139b457816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816139895790505b5090505f5b8351811015611e15575f85815260056020526040902084518590839081106139e3576139e3615b3a565b60200260200101516040516139f8919061590b565b90815260408051918290036020908101832060608401835280546001600160a01b03908116855260018201548116928501929092526002015416908201528251839083908110613a4a57613a4a615b3a565b60200260200101819052508080613a6090615bd9565b9150506139b9565b5f828152601f602090815260408083206001600160a01b038516845282529182902080548351818402810184019094528084526060939283018282801561289257602002820191905f5260205f209081548152602001906001019080831161287e575050505050905092915050565b613adf614892565b601855565b613aec614892565b600160095f8581526020019081526020015f2083604051613b0d919061590b565b90815260408051602092819003830181206001600160a01b0386165f90815293529120805460ff1916921515929092179091557ff6587e9ff1b3716caba7b2b276ab87a83b9a624760c75b978846a5dd29c1b821906119e490859085908590615bf1565b6021602052815f5260405f208181548110612ade575f80fd5b5f838152600860205260408082209051613ba590859061590b565b908152604080519182900360209081019092206001600160a01b0385165f908152925290205460ff1690509392505050565b613be28484846117c6565b6001600160a01b0383163b15613c1b57613bfe84848484614a87565b613c1b576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b601f602052825f5260405f20602052815f5260405f208181548110611bbf575f80fd5b613c4c614892565b6003548114613c8c5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b604482015260640161151a565b5f5b5f82815260216020526040902054811015613df2575f828152602160205260408120805483908110613cc257613cc2615b3a565b5f9182526020822001546001600160a01b03169150613ce082612ba3565b90505f81118015613d0757506001600160a01b0382165f908152601d602052604090205484145b15613ddd57604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa158015613d4d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613d749190810190615b4e565b5f858152602080805260408083206001600160a01b038716845282529091208251613da59391929190910190614ebc565b505f8481526022602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b50508080613dea90615bd9565b915050613c8e565b50613dfd6001611108565b6040518181527ffbb075c42ca347b78331c9c8496fbb654104e60704c8238bf4d36eb1593989d790602001611161565b5f613e36611bd2565b601354909150600160a01b900460ff1615613e835760405162461bcd60e51b815260206004820152600d60248201526c14d9585cdbdb881b1bd8dad959609a1b604482015260640161151a565b6001613e8e33612ba3565b1015613ec45760405162461bcd60e51b81526020600482015260056024820152640c0813919560da1b604482015260640161151a565b600354335f908152601d602052604090205403613f235760405162461bcd60e51b815260206004820152601760248201527f416c7265616479207061696420736561736f6e20666565000000000000000000604482015260640161151a565b80341015613f665760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41022ba3432b960811b604482015260640161151a565b60038054335f818152601d60209081526040808320859055938252601e815283822080546001810182559083528183200180546001600160a01b03191690931790925592548352601c905281208054839290613fc3908490614f44565b909155505060035460408051338152602081019290925281018290527febde69485665a3adf8d26912798b811ae2db1a75c07defd73d48fc47db99785790606001611161565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f80825260208201819052918101829052606081019190915260018310806140605750600b548310155b1561406b5792915050565b61407483614a30565b90508060400151156140865792915050565b61356283614b6f565b606061409a826148eb565b6140d15760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b604482015260640161151a565b5f6140da614ba3565b90505f8151116140f85760405180602001604052805f815250613562565b8061410284614bb2565b601660405160200161411693929190615d5c565b6040516020818303038152906040529392505050565b614134614892565b604080516060810182526001600160a01b038581168252848116602080840191909152908416828401525f888152600590915282902091519091829161417b90889061590b565b9081526040805160209281900383018120845181546001600160a01b03199081166001600160a01b03928316178355948601516001830180548716918316919091179055949092015160029092018054909316919093161790557f6920e51a876be9823a94c47743fcd58300bd2b1096de83763b2e96bca14060b69061420a9088908890889088908890615d8d565b60405180910390a1505050505050565b604080516060810182525f80825260208201819052918101829052819081905f86815260056020526040908190209051612d5890879061590b565b5f838152600960205260408082209051613ba590859061590b565b601a818154811061427f575f80fd5b905f5260205f20015f91509050805461220b906158d9565b61429f614892565b604080516060810182526001600160a01b038581168252848116602080840191909152908416828401525f88815260069091528290209151909182916142e690889061590b565b9081526040805160209281900383018120845181546001600160a01b03199081166001600160a01b03928316178355948601516001830180548716918316919091179055949092015160029092018054909316919093161790557fc8944446876ea5e2d36f9393ccbae6fab404b80804e2c23678f1d058995796da9061420a9088908890889088908890615d8d565b815f8111801561438757506018548111155b6143c45760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015260640161151a565b601754816143d06114c1565b6143da9190614f44565b11156144155760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b604482015260640161151a565b61441d614892565b6144278284614a6a565b816001600160a01b03167f8e0967594cd36a9792b80109735e3dde4394a465815a0337061942b21ccad63c8461445b6114c1565b6040805192835260208301919091520160405180910390a2505050565b614480614892565b6001600160a01b0381166144e55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161151a565b6121fb816149e1565b6144f6614892565b601354600160a81b900460ff1615614625575f818152602080805260408083206001600160a01b0386168452909152902054156145455760405162461bcd60e51b815260040161151a90615dcf565b5f61454f83612ba3565b1161456c5760405162461bcd60e51b815260040161151a90615df9565b604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156145ad573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526145d49190810190615b4e565b5f828152602080805260408083206001600160a01b0387168452825290912082516146059391929190910190614ebc565b506001600160a01b0382165f908152601d60205260409020819055614853565b601354600160a01b900460ff1615614738575f818152601f602090815260408083206001600160a01b0386168452909152902054156146765760405162461bcd60e51b815260040161151a90615dcf565b5f61468083612ba3565b1161469d5760405162461bcd60e51b815260040161151a90615df9565b604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156146de573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526147059190810190615b4e565b5f828152601f602090815260408083206001600160a01b0387168452825290912082516146059391929190910190614ebc565b6001600160a01b0382165f908152601d602052604090205481900361476f5760405162461bcd60e51b815260040161151a90615dcf565b5f61477983612ba3565b116147965760405162461bcd60e51b815260040161151a90615df9565b6001600160a01b0382165f908152601d60205260408120829055805b5f838152601e602052604090205481101561481d575f838152601e602052604090208054339190839081106147e9576147e9615b3a565b5f918252602090912001546001600160a01b03160361480b576001915061481d565b8061481581615bd9565b9150506147b2565b5080614851575f828152601e602090815260408220805460018101825590835291200180546001600160a01b031916331790555b505b604080516001600160a01b0384168152602081018390527ff455acd0a554ca90e7c2ae9037901c932fe91c38fbdd2b985d2b1af020fa66639101611afb565b5f546001600160a01b03163314612c005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161151a565b5f816001111580156148fe5750600b5482105b80156111025750505f908152600f6020526040902054600160e01b161590565b5f818060011161496f57600b5481101561496f575f818152600f602052604081205490600160e01b8216900361496d575b805f0361356257505f19015f818152600f602052604090205461494f565b505b604051636f96cda160e11b815260040160405180910390fd5b6002600154036149da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161151a565b6002600155565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f828152600f602052604090205461110290614c41565b614a83828260405180602001604052805f815250614c88565b5050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290614abb903390899088908890600401615e1c565b6020604051808303815f875af1925050508015614af5575060408051601f3d908101601f19168201909252614af291810190615e58565b60015b614b51573d808015614b22576040519150601f19603f3d011682016040523d82523d5f602084013e614b27565b606091505b5080515f03614b49576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152611102614b9e8361491e565b614c41565b60606015805461117b906158d9565b60605f614bbe83614cec565b60010190505f816001600160401b03811115614bdc57614bdc615068565b6040519080825280601f01601f191660200182016040528015614c06576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084614c1057509392505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b614c928383614dc3565b6001600160a01b0383163b156113bd57600b548281035b614cbb5f868380600101945086614a87565b614cd8576040516368d2bf6b60e11b815260040160405180910390fd5b818110614ca95781600b5414612829575f80fd5b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310614d2a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614d56576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310614d7457662386f26fc10000830492506010015b6305f5e1008310614d8c576305f5e100830492506008015b6127108310614da057612710830492506004015b60648310614db2576064830492506002015b600a83106111025760010192915050565b600b545f829003614de75760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383165f8181526010602090815260408083208054680100000000000000018802019055848352600f90915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114614e935780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101614e5d565b50815f03614eb357604051622e076360e81b815260040160405180910390fd5b600b5550505050565b828054828255905f5260205f20908101928215614ef5579160200282015b82811115614ef5578251825591602001919060010190614eda565b50614f01929150614f1c565b5090565b5080545f8255905f5260205f20908101906121fb91905b5b80821115614f01575f8155600101614f1d565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561110257611102614f30565b6001600160e01b0319811681146121fb575f80fd5b5f60208284031215614f7c575f80fd5b813561356281614f57565b80358015158114614f96575f80fd5b919050565b5f60208284031215614fab575f80fd5b61356282614f87565b5f5b83811015614fce578181015183820152602001614fb6565b50505f910152565b5f8151808452614fed816020860160208601614fb4565b601f01601f19169290920160200192915050565b602081525f6135626020830184614fd6565b5f60208284031215615023575f80fd5b5035919050565b6001600160a01b03811681146121fb575f80fd5b5f806040838503121561504f575f80fd5b823561505a8161502a565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156150a4576150a4615068565b604052919050565b5f6001600160401b038311156150c4576150c4615068565b6150d7601f8401601f191660200161507c565b90508281528383830111156150ea575f80fd5b828260208301375f602084830101529392505050565b5f82601f83011261510f575f80fd5b613562838335602085016150ac565b5f806040838503121561512f575f80fd5b82356001600160401b0380821115615145575f80fd5b61515186838701615100565b93506020850135915080821115615166575f80fd5b5061517385828601615100565b9150509250929050565b602080825282518282018190525f9190848201906040850190845b818110156130f15783516001600160a01b031683529284019291840191600101615198565b5f602082840312156151cd575f80fd5b81356001600160401b038111156151e2575f80fd5b614b6784828501615100565b5f805f60608486031215615200575f80fd5b833561520b8161502a565b9250602084013561521b8161502a565b929592945050506040919091013590565b5f805f6060848603121561523e575f80fd5b8335925060208401356001600160401b0381111561525a575f80fd5b61526686828701615100565b92505060408401356152778161502a565b809150509250925092565b5f8060408385031215615293575f80fd5b8235915060208301356001600160401b038111156152af575f80fd5b61517385828601615100565b5f805f606084860312156152cd575f80fd5b83359250602084013561521b8161502a565b5f6001600160401b038211156152f7576152f7615068565b5060051b60200190565b5f8060408385031215615312575f80fd5b823591506020808401356001600160401b0380821115615330575f80fd5b818601915086601f830112615343575f80fd5b8135615356615351826152df565b61507c565b81815260059190911b83018401908481019089831115615374575f80fd5b8585015b838110156153ab5780358581111561538f575f8081fd5b61539d8c89838a0101615100565b845250918601918601615378565b508096505050505050509250929050565b602080825282518282018190525f919060409081850190868401855b8281101561541657815180516001600160a01b03908116865287820151811688870152908601511685850152606090930192908501906001016153d8565b5091979650505050505050565b5f60208284031215615433575f80fd5b81356135628161502a565b5f805f805f60a08688031215615452575f80fd5b853561545d8161502a565b94506020860135935060408601356001600160401b0381111561547e575f80fd5b61548a88828901615100565b9598949750949560608101359550608001359392505050565b5f80604083850312156154b4575f80fd5b8235915060208301356154c68161502a565b809150509250929050565b602080825282518282018190525f9190848201906040850190845b818110156130f1578351835292840192918401916001016154ec565b5f8060208385031215615519575f80fd5b82356001600160401b038082111561552f575f80fd5b818501915085601f830112615542575f80fd5b813581811115615550575f80fd5b8660208260051b8501011115615564575f80fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156130f1576155e0838551615576565b92840192608092909201916001016155cd565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b610180810161563582866155f3565b61564260808301856155f3565b614b676101008301846155f3565b5f8060408385031215615661575f80fd5b50508035926020909101359150565b5f60808284031215615680575f80fd5b604051608081018181106001600160401b03821117156156a2576156a2615068565b60405290508082356156b38161502a565b815260208301356156c38161502a565b602082015260408301356156d68161502a565b604082015260608301356156e98161502a565b6060919091015292915050565b5f805f806101a0858703121561570a575f80fd5b8435935061571b8660208701615670565b925061572a8660a08701615670565b915061573a866101208701615670565b905092959194509250565b5f805f60608486031215615757575f80fd5b83356157628161502a565b95602085013595506040909401359392505050565b5f8060408385031215615788575f80fd5b82356157938161502a565b91506157a160208401614f87565b90509250929050565b5f805f80608085870312156157bd575f80fd5b84356157c88161502a565b935060208501356157d88161502a565b92506040850135915060608501356001600160401b038111156157f9575f80fd5b8501601f81018713615809575f80fd5b615818878235602084016150ac565b91505092959194509250565b608081016111028284615576565b5f805f805f60a08688031215615846575f80fd5b8535945060208601356001600160401b03811115615862575f80fd5b61586e88828901615100565b945050604086013561587f8161502a565b9250606086013561588f8161502a565b9150608086013561589f8161502a565b809150509295509295909350565b5f80604083850312156158be575f80fd5b82356158c98161502a565b915060208301356154c68161502a565b600181811c908216806158ed57607f821691505b602082108103611aa457634e487b7160e01b5f52602260045260245ffd5b5f825161591c818460208701614fb4565b9190910192915050565b5f8154615932816158d9565b6001828116801561594a576001811461595f5761598b565b60ff198416875282151583028701945061598b565b855f526020805f205f5b858110156159825781548a820152908401908201615969565b50505082870194505b5050505092915050565b5f6135628284615926565b601f8211156113bd575f81815260208120601f850160051c810160208610156159c65750805b601f850160051c820191505b8181101561194f578281556001016159d2565b81516001600160401b038111156159fe576159fe615068565b615a1281615a0c84546158d9565b846159a0565b602080601f831160018114615a45575f8415615a2e5750858301515b5f19600386901b1c1916600185901b17855561194f565b5f85815260208120601f198616915b82811015615a7357888601518255948401946001909101908401615a54565b5085821015615a9057878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b604081525f808454615ab1816158d9565b806040860152606060018084165f8114615ad25760018114615aec57615b1a565b60ff1985168884015283151560051b880183019550615b1a565b895f526020805f205f5b86811015615b115781548b8201870152908401908201615af6565b8a018501975050505b50505050508281036020840152615b318185614fd6565b95945050505050565b634e487b7160e01b5f52603260045260245ffd5b5f6020808385031215615b5f575f80fd5b82516001600160401b03811115615b74575f80fd5b8301601f81018513615b84575f80fd5b8051615b92615351826152df565b81815260059190911b82018301908381019087831115615bb0575f80fd5b928401925b82841015615bce57835182529284019290840190615bb5565b979650505050505050565b5f60018201615bea57615bea614f30565b5060010190565b838152606060208201525f615c096060830185614fd6565b905060018060a01b0383166040830152949350505050565b805169ffffffffffffffffffff81168114614f96575f80fd5b5f805f805f60a08688031215615c4e575f80fd5b615c5786615c21565b9450602086015193506040860151925060608601519150615c7a60808701615c21565b90509295509295909350565b828152604060208201525f614b676040830184614fd6565b5f82615cb857634e487b7160e01b5f52601260045260245ffd5b500490565b808202811582820484141761110257611102614f30565b6020808252600a90820152692737ba103bb4b73732b960b11b604082015260600190565b848152608060208201525f615d106080830186614fd6565b6001600160a01b03949094166040830152506060015292915050565b8481526101a08101615d4160208301866155f3565b615d4e60a08301856155f3565b615b316101208301846155f3565b5f8451615d6d818460208901614fb4565b845190830190615d81818360208901614fb4565b615bce81830186615926565b85815260a060208201525f615da560a0830187614fd6565b6001600160a01b039586166040840152938516606083015250921660809092019190915292915050565b60208082526010908201526f283630bcb2b91034b71039b2b0b9b7b760811b604082015260600190565b602080825260099082015268042616c616e636520360bc1b604082015260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90615e4e90830184614fd6565b9695505050505050565b5f60208284031215615e68575f80fd5b815161356281614f5756fea2646970667358221220ded47ee65e7c5a114a30b3ebc26da4c29f3b6be8633f038f2581a80f913a5ff664736f6c6343000815003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84190000000000000000000000000000000000000000000000000000000000000006484f5354443400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004484f535400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106104df575f3560e01c8063724e78da11610283578063b2030c2511610155578063ca5c7b91116100c9578063e96a38bf11610083578063e96a38bf14610fc6578063e985e9c514610fe5578063efbd73f41461102c578063f2fde38b1461104b578063f71da8eb1461106a578063fb753fff14611098575f80fd5b8063ca5c7b9114610f17578063d4bdf10a14610f35578063d5abeb0114610f54578063d71b03af14610f69578063dbfd13f014610f88578063e06d940914610fa7575f80fd5b8063be388c0b1161011a578063be388c0b14610e4f578063bf8fe30814610e6e578063bfa6b4ff14610e76578063c051754914610ea1578063c23dc68f14610ecc578063c87b56dd14610ef8575f80fd5b8063b2030c2514610dca578063b2965d0614610de9578063b88d4fde14610e08578063bc28e89014610e1b578063bcb3962114610e3a575f80fd5b806394864c5c116101f7578063a22cb465116101b1578063a22cb46514610d04578063a65731f814610d23578063aadd546f14610d42578063af69ff3314610d61578063b071401b14610d8c578063b0ce388b14610dab575f80fd5b806394864c5c14610c6157806395d89b4114610c8057806398656a9f14610c94578063992017c214610cb357806399a2557a14610cd2578063a0712d6814610cf1575f80fd5b80637ec4a659116102485780637ec4a65914610bb457806382ea39ee14610bd3578063838f4fdb14610bf25780638462151c14610c115780638da5cb5b14610c3057806394354fd014610c4c575f80fd5b8063724e78da14610aef578063741596f314610b0e578063757dd25614610b2d57806377822d2614610b7657806379b2638e14610b95575f80fd5b80633f541e07116103bc57806362b99ad41161033057806369f615b6116102ea57806369f615b614610a1a5780636ac8d2e414610a5e5780636c33008214610a7e5780636f8b44b014610a9d57806370a0823114610abc578063715018a614610adb575f80fd5b806362b99ad4146109555780636352211e1461096957806364697b2b1461098857806366e885df146109a757806366eb623e146109c6578063676f6056146109e6575f80fd5b80635503a0e8116103815780635503a0e81461088357806355e441f014610897578063563cac5a146108b65780635bbb2177146108e25780635c975abb1461090e5780635d55c36714610927575f80fd5b80633f541e07146107f257806342842e0e146108065780634328b89214610819578063440330d014610845578063487ab45a14610864575f80fd5b80631ff3c18b1161045357806329fa1cb71161041857806329fa1cb71461074d5780632dfbc546146107625780633021459914610781578063356eb9031461079557806339e211c9146107b45780633e615e6c146107d3575f80fd5b80631ff3c18b146106c8578063211e28b6146106dd57806321606f16146106fc57806322a3e8ca1461071b57806323b872dd1461073a575f80fd5b80630fb04612116104a45780630fb0461214610608578063118934cc1461062757806314620b5b1461064a57806316ba10e01461067657806316c38b3c1461069557806318160ddd146106b4575f80fd5b806301ffc9a714610548578063053f12661461057c57806306fdde031461059d578063081812fc146105be578063095ea7b3146105f5575f80fd5b3661054457604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a16003545f908152601c60205260408120805434929061053c908490614f44565b925050819055005b5f80fd5b348015610553575f80fd5b50610567610562366004614f6c565b6110b7565b60405190151581526020015b60405180910390f35b348015610587575f80fd5b5061059b610596366004614f9b565b611108565b005b3480156105a8575f80fd5b506105b161116c565b6040516105739190615001565b3480156105c9575f80fd5b506105dd6105d8366004615013565b6111fc565b6040516001600160a01b039091168152602001610573565b61059b61060336600461503e565b61123e565b348015610613575f80fd5b5061059b61062236600461511e565b6112dc565b348015610632575f80fd5b5061063c60025481565b604051908152602001610573565b348015610655575f80fd5b50610669610664366004615013565b6113c2565b604051610573919061517d565b348015610681575f80fd5b5061059b6106903660046151bd565b61142b565b3480156106a0575f80fd5b5061059b6106af366004614f9b565b611472565b3480156106bf575f80fd5b5061063c6114c1565b3480156106d3575f80fd5b5061063c60145481565b3480156106e8575f80fd5b5061059b6106f7366004614f9b565b6114ce565b348015610707575f80fd5b50610669610716366004615013565b611574565b348015610726575f80fd5b5061059b610735366004615013565b6115db565b61059b6107483660046151ee565b6117c6565b348015610758575f80fd5b5061063c601b5481565b34801561076d575f80fd5b5061059b61077c36600461522c565b611957565b34801561078c575f80fd5b5061063c6119f1565b3480156107a0575f80fd5b5061059b6107af366004615282565b611aaa565b3480156107bf575f80fd5b5061059b6107ce366004615013565b611b07565b3480156107de575f80fd5b5061063c6107ed3660046152bb565b611b9d565b3480156107fd575f80fd5b5061063c611bd2565b61059b6108143660046151ee565b611c53565b348015610824575f80fd5b50610838610833366004615301565b611c6d565b60405161057391906153bc565b348015610850575f80fd5b5061059b61085f36600461503e565b611e1d565b34801561086f575f80fd5b5061059b61087e366004615423565b612011565b34801561088e575f80fd5b506105b16121fe565b3480156108a2575f80fd5b5061059b6108b136600461543e565b61228a565b3480156108c1575f80fd5b506108d56108d03660046154a3565b612830565b60405161057391906154d1565b3480156108ed575f80fd5b506109016108fc366004615508565b61289f565b60405161057391906155b2565b348015610919575f80fd5b506019546105679060ff1681565b348015610932575f80fd5b50610946610941366004615013565b612966565b60405161057393929190615626565b348015610960575f80fd5b506105b1612a8a565b348015610974575f80fd5b506105dd610983366004615013565b612a97565b348015610993575f80fd5b506105b16109a23660046151bd565b612aa1565b3480156109b2575f80fd5b506105dd6109c1366004615650565b612ac5565b3480156109d1575f80fd5b5060135461056790600160a81b900460ff1681565b3480156109f1575f80fd5b5061063c610a00366004615423565b6001600160a01b03165f908152601d602052604090205490565b348015610a25575f80fd5b50610567610a343660046154a3565b5f918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b348015610a69575f80fd5b5060135461056790600160a01b900460ff1681565b348015610a89575f80fd5b506105b1610a98366004615013565b612af9565b348015610aa8575f80fd5b5061059b610ab7366004615013565b612b11565b348015610ac7575f80fd5b5061063c610ad6366004615423565b612ba3565b348015610ae6575f80fd5b5061059b612bef565b348015610afa575f80fd5b5061059b610b09366004615423565b612c02565b348015610b19575f80fd5b50610669610b28366004615013565b612cb6565b348015610b38575f80fd5b50610b4c610b47366004615282565b612d1d565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610573565b348015610b81575f80fd5b506105dd610b90366004615650565b612da8565b348015610ba0575f80fd5b5061059b610baf3660046154a3565b612dc1565b348015610bbf575f80fd5b5061059b610bce3660046151bd565b612e2c565b348015610bde575f80fd5b50610567610bed366004615423565b612e73565b348015610bfd575f80fd5b5061059b610c0c366004615013565b612f82565b348015610c1c575f80fd5b506108d5610c2b366004615423565b612ff9565b348015610c3b575f80fd5b505f546001600160a01b03166105dd565b348015610c57575f80fd5b5061063c60185481565b348015610c6c575f80fd5b5061059b610c7b366004615013565b6130fd565b348015610c8b575f80fd5b506105b1613180565b348015610c9f575f80fd5b5061059b610cae366004614f9b565b61318f565b348015610cbe575f80fd5b5061059b610ccd3660046156f6565b6131f7565b348015610cdd575f80fd5b506108d5610cec366004615745565b6133e9565b61059b610cff366004615013565b613569565b348015610d0f575f80fd5b5061059b610d1e366004615777565b613855565b348015610d2e575f80fd5b50610838610d3d366004615301565b6138c0565b348015610d4d575f80fd5b506108d5610d5c3660046154a3565b613a68565b348015610d6c575f80fd5b5061063c610d7b366004615423565b601d6020525f908152604090205481565b348015610d97575f80fd5b5061059b610da6366004615013565b613ad7565b348015610db6575f80fd5b5061059b610dc536600461522c565b613ae4565b348015610dd5575f80fd5b506105dd610de4366004615650565b613b71565b348015610df4575f80fd5b50610567610e0336600461522c565b613b8a565b61059b610e163660046157aa565b613bd7565b348015610e26575f80fd5b5061063c610e353660046152bb565b613c21565b348015610e45575f80fd5b5061063c60035481565b348015610e5a575f80fd5b5061059b610e69366004615013565b613c44565b61059b613e2d565b348015610e81575f80fd5b5061063c610e90366004615013565b5f908152601c602052604090205490565b348015610eac575f80fd5b5061063c610ebb366004615013565b601c6020525f908152604090205481565b348015610ed7575f80fd5b50610eeb610ee6366004615013565b614009565b6040516105739190615824565b348015610f03575f80fd5b506105b1610f12366004615013565b61408f565b348015610f22575f80fd5b5060195461056790610100900460ff1681565b348015610f40575f80fd5b5061059b610f4f366004615832565b61412c565b348015610f5f575f80fd5b5061063c60175481565b348015610f74575f80fd5b50610b4c610f83366004615282565b61421a565b348015610f93575f80fd5b50610567610fa236600461522c565b614255565b348015610fb2575f80fd5b506105b1610fc1366004615013565b614270565b348015610fd1575f80fd5b5061059b610fe0366004615832565b614297565b348015610ff0575f80fd5b50610567610fff3660046158ad565b6001600160a01b039182165f90815260126020908152604080832093909416825291909152205460ff1690565b348015611037575f80fd5b5061059b6110463660046154a3565b614375565b348015611056575f80fd5b5061059b611065366004615423565b614478565b348015611075575f80fd5b50610567611084366004615013565b60046020525f908152604090205460ff1681565b3480156110a3575f80fd5b5061059b6110b236600461503e565b6144ee565b5f6301ffc9a760e01b6001600160e01b0319831614806110e757506380ac58cd60e01b6001600160e01b03198316145b806111025750635b5e139f60e01b6001600160e01b03198316145b92915050565b611110614892565b6013805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f20683884310c950f2723f8aa6b7c55b74fe0a09f03ebf4d4bc5acdcd7a419f3a906020015b60405180910390a150565b6060600d805461117b906158d9565b80601f01602080910402602001604051908101604052809291908181526020018280546111a7906158d9565b80156111f25780601f106111c9576101008083540402835291602001916111f2565b820191905f5260205f20905b8154815290600101906020018083116111d557829003601f168201915b5050505050905090565b5f611206826148eb565b611223576040516333d1c03960e21b815260040160405180910390fd5b505f908152601160205260409020546001600160a01b031690565b5f61124882612a97565b9050336001600160a01b03821614611281576112648133610fff565b611281576040516367d9dca160e11b815260040160405180910390fd5b5f8281526011602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6112e4614892565b604080515f815260208101918290525181209060249061130590859061590b565b90815260200160405180910390206040516020016113239190615995565b604051602081830303815290604052805190602001200361139257601a80546001810182555f919091527f057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e0161137983826159e5565b506001601b5f82825461138c9190614f44565b90915550505b806024836040516113a3919061590b565b908152602001604051809103902090816113bd91906159e5565b505050565b5f8181526022602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611401575b50505050509050919050565b611433614892565b601661143f82826159e5565b507f1ac6f3d53715a749e1ae8dab4eac30a61355daa3dec365a0c916f6e0be18ee05601682604051611161929190615aa0565b61147a614892565b6019805460ff191682151590811790915560405160ff909116151581527fa9bfed3d98385b3777389e321dbde773cf7d335fa604fefbae3dca93564f558690602001611161565b600c54600b54035f190190565b6114d6614892565b601954610100900460ff16156115235760405162461bcd60e51b815260206004820152600d60248201526c14dd5c1c1b1e481b1bd8dad959609a1b60448201526064015b60405180910390fd5b6019805461ff0019166101008315158102919091179182905560405160ff9190920416151581527f770fc13e7d1ebb2c22208be39268bda6859dd047d6bf945392aee26aab1cc77c90602001611161565b5f8181526021602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116114015750505050509050919050565b6115e3614892565b60035481146116235760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b604482015260640161151a565b5f5b5f828152601e602052604090205481101561178b575f828152601e6020526040812080548390811061165957611659615b3a565b5f9182526020822001546001600160a01b0316915061167782612ba3565b90505f8111801561169e57506001600160a01b0382165f908152601d602052604090205484145b1561177657604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156116e4573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261170b9190810190615b4e565b5f858152601f602090815260408083206001600160a01b03871684528252909120825161173e9391929190910190614ebc565b505f8481526021602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b5050808061178390615bd9565b915050611625565b50611796600161318f565b6040518181527f840b10a8e21e1ddc3c6028054db7a94117e719acc8c5bac0542c693151d35d7090602001611161565b5f6117d08261491e565b9050836001600160a01b0316816001600160a01b0316146118035760405162a1148160e81b815260040160405180910390fd5b5f8281526011602052604090208054338082146001600160a01b0388169091141761184f576118328633610fff565b61184f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661187657604051633a954ecd60e21b815260040160405180910390fd5b8015611880575f82555b6001600160a01b038681165f9081526010602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f858152600f6020526040812091909155600160e11b8416900361190d57600184015f818152600f6020526040812054900361190b57600b54811461190b575f818152600f602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b61195f614892565b600160085f8581526020019081526020015f2083604051611980919061590b565b90815260408051602092819003830181206001600160a01b0386165f90815293529120805460ff1916921515929092179091557fcc9a19295158baf2152ed4e27dc5598749ccd51d8c10bbda2a83dc9aabf0defa906119e490859085908590615bf1565b60405180910390a1505050565b5f805f60135f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015611a44573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a689190615c3a565b509350509250505f8111611aa45760405162461bcd60e51b815260206004820152600360248201526222a92960e91b604482015260640161151a565b50919050565b611ab2614892565b5f828152602360205260409020611ac982826159e5565b507f92e9ffddeaa74e310937d5ea9dc0b00dab9e3efce2bc47e91b8bc6ee41c98bf48282604051611afb929190615c86565b60405180910390a15050565b611b0f614892565b6003548111611b4d5760405162461bcd60e51b815260206004820152600a60248201526910b3ba1039b2b0b9b7b760b11b604482015260640161151a565b6003819055611b5b5f61318f565b611b645f611108565b60035460408051918252602082018390527fc10fb081607c5cd4f8580ca12696f39a0212fc426b51a19e521fd4611008f1119101611161565b60208052825f5260405f20602052815f5260405f208181548110611bbf575f80fd5b905f5260205f20015f9250925050505481565b5f80611bdc6119f1565b90505f8113611c1a5760405162461bcd60e51b815260206004820152600a6024820152692332b2b21032b93937b960b11b604482015260640161151a565b5f611c296305f5e10083615c9e565b905080601454670de0b6b3a7640000611c429190615cbd565b611c4c9190615c9e565b9250505090565b6113bd83838360405180602001604052805f815250613bd7565b5f8281526006602052604081208251606092919084908390611c9157611c91615b3a565b6020026020010151604051611ca6919061590b565b908152604051908190036020019020546001600160a01b031603611cfe5760405162461bcd60e51b815260206004820152600f60248201526e15da5b9b995c9cc81b9bdd081cd95d608a1b604482015260640161151a565b5f82516001600160401b03811115611d1857611d18615068565b604051908082528060200260200182016040528015611d6157816020015b604080516060810182525f80825260208083018290529282015282525f19909201910181611d365790505b5090505f5b8351811015611e15575f8581526006602052604090208451859083908110611d9057611d90615b3a565b6020026020010151604051611da5919061590b565b90815260408051918290036020908101832060608401835280546001600160a01b03908116855260018201548116928501929092526002015416908201528251839083908110611df757611df7615b3a565b60200260200101819052508080611e0d90615bd9565b915050611d66565b509392505050565b611e25614892565b601354600160a81b900460ff1615611ed8575f818152602080805260408083206001600160a01b0386168452909152902054611e935760405162461bcd60e51b815260206004820152600d60248201526c2737ba1034b71039b2b0b9b7b760991b604482015260640161151a565b5f818152602080805260408083206001600160a01b03861684529091528120611ebb91614f05565b6001600160a01b0382165f908152601d6020526040812055611fd2565b601354600160a01b900460ff1615611f72575f818152601f602090815260408083206001600160a01b0386168452909152902054611f485760405162461bcd60e51b815260206004820152600d60248201526c2737ba1034b71039b2b0b9b7b760991b604482015260640161151a565b5f818152601f602090815260408083206001600160a01b03861684529091528120611ebb91614f05565b5f818152601e6020526040902054611fb95760405162461bcd60e51b815260206004820152600a6024820152694e6f20706c617965727360b01b604482015260640161151a565b6001600160a01b0382165f908152601d60205260408120555b604080516001600160a01b0384168152602081018390527f515d7b15fe0a74980600135c872fe8534a6c86f99cbf6a8eae00dcf00f2a26d09101611afb565b612019614892565b612021614988565b478061205a5760405162461bcd60e51b81526020600482015260086024820152674e6f2066756e647360c01b604482015260640161151a565b6001600160a01b03821661209a5760405162461bcd60e51b81526020600482015260076024820152661a5b9d985b1a5960ca1b604482015260640161151a565b6003545f9081526004602052604090205460ff16156120ea5760405162461bcd60e51b815260206004820152600c60248201526b105b1c9958591e481c185a5960a21b604482015260640161151a565b5f6064600254836120fb9190615cbd565b6121059190615c9e565b90505f836001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612150576040519150601f19603f3d011682016040523d82523d5f602084013e612155565b606091505b505090508061218f5760405162461bcd60e51b815260206004820152600660248201526511985a5b195960d21b604482015260640161151a565b6003545f9081526004602052604090819020805460ff19166001179055516001600160a01b038516907f111d3d894a05740f87707f03ee588f9de29ccb6a030e8c953b37405d48f08816906121e79085815260200190565b60405180910390a25050506121fb60018055565b50565b6016805461220b906158d9565b80601f0160208091040260200160405190810160405280929190818152602001828054612237906158d9565b80156122825780601f1061225957610100808354040283529160200191612282565b820191905f5260205f20905b81548152906001019060200180831161226557829003601f168201915b505050505081565b612292614892565b61229a614988565b834710156122dd5760405162461bcd60e51b815260206004820152601060248201526f4e6f7420656e6f7567682066756e647360801b604482015260640161151a565b6001600160a01b03851661232a5760405162461bcd60e51b815260206004820152601460248201527316995c9bc81859191c995cdcc81a5b9d985b1a5960621b604482015260640161151a565b805f036123ff575f805f61233e858761421a565b925092509250806001600160a01b0316886001600160a01b031614806123755750816001600160a01b0316886001600160a01b0316145b806123915750826001600160a01b0316886001600160a01b0316145b6123ad5760405162461bcd60e51b815260040161151a90615cd4565b6123b885878a613b8a565b156123f75760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161151a565b505050612691565b8060010361248e575f805f6124148587612d1d565b925092509250806001600160a01b0316886001600160a01b0316148061244b5750816001600160a01b0316886001600160a01b0316145b806124675750826001600160a01b0316886001600160a01b0316145b6124835760405162461bcd60e51b815260040161151a90615cd4565b6123b885878a614255565b8060020361265c575f805f6124a285612966565b925092509250825f01516001600160a01b0316886001600160a01b031614806124e0575082602001516001600160a01b0316886001600160a01b0316145b80612500575082604001516001600160a01b0316886001600160a01b0316145b80612520575082606001516001600160a01b0316886001600160a01b0316145b80612537575081516001600160a01b038981169116145b80612557575081602001516001600160a01b0316886001600160a01b0316145b80612577575081604001516001600160a01b0316886001600160a01b0316145b80612597575081606001516001600160a01b0316886001600160a01b0316145b806125ae575080516001600160a01b038981169116145b806125ce575080602001516001600160a01b0316886001600160a01b0316145b806125ee575080604001516001600160a01b0316886001600160a01b0316145b8061260e575080606001516001600160a01b0316886001600160a01b0316145b8061261657505f5b6126325760405162461bcd60e51b815260040161151a90615cd4565b5f858152600a602090815260408083206001600160a01b038c16845290915290205460ff166123b8565b60405162461bcd60e51b815260206004820152600a60248201526977726f6e67206d6f646560b01b604482015260640161151a565b5f856001600160a01b0316856040515f6040518083038185875af1925050503d805f81146126da576040519150601f19603f3d011682016040523d82523d5f602084013e6126df565b606091505b50509050806127275760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b604482015260640161151a565b815f0361277b57612739838588611957565b7fea1db41ef3331dbde41f3474a1e9aef1b9edb0ed37f281a21dd7c2414da0d13c8385888860405161276e9493929190615cf8565b60405180910390a161281f565b816001036127c35761278e838588613ae4565b7f1c7df26c32ef0d46644941eeb2cc748b2df0de2243a5043683badcc0d32bfb628385888860405161276e9493929190615cf8565b8160020361281f576127d58387612dc1565b604080518481526001600160a01b03881660208201529081018690527fa10cd7d468bc91ddabd904aec5542b141aa603688a7010dc3c2035d5c51a99619060600160405180910390a15b5061282960018055565b5050505050565b5f828152602080805260408083206001600160a01b038516845282529182902080548351818402810184019094528084526060939283018282801561289257602002820191905f5260205f20905b81548152602001906001019080831161287e575b5050505050905092915050565b6060815f816001600160401b038111156128bb576128bb615068565b60405190808252806020026020018201604052801561290b57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f199092019101816128d95790505b5090505f5b82811461295d5761293886868381811061292c5761292c615b3a565b90506020020135614009565b82828151811061294a5761294a615b3a565b6020908102919091010152600101612910565b50949350505050565b60408051608080820183525f80835260208084018290528385018290526060938401829052845180840186528281528082018390528086018390528401829052845180840186528281528082018390528086018390528401829052948152600780865290849020845160e08101865281546001600160a01b0390811682870190815260018401548216838701526002840154821660a08401526003840154821660c084015282528651808601885260048401548216815260058401548216818a0152600684015482168189015293830154811684870152818801938452865194850187526008830154811685526009830154811697850197909752600a820154871684870152600b9091015490951692820192909252918301829052915191519192565b6015805461220b906158d9565b5f6111028261491e565b80516020818301810180516024825292820191909301209152805461220b906158d9565b6022602052815f5260405f208181548110612ade575f80fd5b5f918252602090912001546001600160a01b03169150829050565b60236020525f90815260409020805461220b906158d9565b612b19614892565b601954610100900460ff1615612b615760405162461bcd60e51b815260206004820152600d60248201526c14dd5c1c1b1e481b1bd8dad959609a1b604482015260640161151a565b60178190557fa626f93317e2474b716846a09cf0e28aacb96052643b252fe97704208fecf9b5612b8f6114c1565b604080519182526020820184905201611161565b5f6001600160a01b038216612bcb576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152601060205260409020546001600160401b031690565b612bf7614892565b612c005f6149e1565b565b612c0a614892565b6001600160a01b038116612c4d5760405162461bcd60e51b815260206004820152600a6024820152690416464726573732021360b41b604482015260640161151a565b601354604080516001600160a01b03928316815291831660208301527ff41a3b1d02012f65ae0013b820b751937676e06fe15550a1841ad88825d0b0dd910160405180910390a1601380546001600160a01b0319166001600160a01b0392909216919091179055565b5f818152601e602090815260409182902080548351818402810184019094528084526060939283018282801561141f57602002820191905f5260205f209081546001600160a01b031681526001909101906020018083116114015750505050509050919050565b604080516060810182525f80825260208201819052918101829052819081905f86815260066020526040908190209051612d5890879061590b565b908152604080516020928190038301812060608201835280546001600160a01b03908116808452600183015482169584018690526002909201541691909201819052909891975095509350505050565b601e602052815f5260405f208181548110612ade575f80fd5b612dc9614892565b5f828152600a602090815260408083206001600160a01b03851680855290835292819020805460ff191660011790558051858152918201929092527f13cba76f63b6f3be76386be2c5d7e42b0ca5ae14fc2a73794b41ab8a5d211dc09101611afb565b612e34614892565b6015612e4082826159e5565b507f2ed2020dff3b323b7cfdc5a6377cf8ca1853e7196b70d0c5785290362202e4e8601582604051611161929190615aa0565b6013545f90600160a81b900460ff1615612ee8576003546001600160a01b0383165f908152601d6020526040902054148015612ed057506003545f908152602080805260408083206001600160a01b038616845290915290205415155b801561110257505f612ee183612ba3565b1192915050565b601354600160a01b900460ff1615612f55576003546001600160a01b0383165f908152601d6020526040902054148015612ed057506003545f908152601f602090815260408083206001600160a01b03861684529091529020541515801561110257505f612ee183612ba3565b6003546001600160a01b0383165f908152601d602052604090205414801561110257505f612ee183612ba3565b612f8a614892565b601e811115612fc45760405162461bcd60e51b815260040161151a9060208082526004908201526303e2033360e41b604082015260600190565b60028190556040518181527f566d8bfc8fe0c7e33a876501a7215286a812e1da6a33035eeee1c776dbad118390602001611161565b60605f805f61300785612ba3565b90505f816001600160401b0381111561302257613022615068565b60405190808252806020026020018201604052801561304b578160200160208202803683370190505b509050613077604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146130f15761308a81614a30565b915081604001516130e95781516001600160a01b0316156130aa57815194505b876001600160a01b0316856001600160a01b0316036130e957808387806001019850815181106130dc576130dc615b3a565b6020026020010181815250505b60010161307a565b50909695505050505050565b613105614892565b5f811161313f5760405162461bcd60e51b81526020600482015260086024820152670466565203c3d20360c41b604482015260640161151a565b60145460408051918252602082018390527f7ca8990c1cd963d0dde430d732306d8718e4e2bb28b1a8e9bab98f5f4f9fdf23910160405180910390a1601455565b6060600e805461117b906158d9565b613197614892565b6013805460ff60a01b1916600160a01b831515810291909117918290556003546040805191825260ff9290930491909116151560208201527f5f36fa90cde6e49fa7bc75d78d9ed2ccc1d0793e7073eb45de898405533649b99101611161565b6131ff614892565b61327c6040805160e081019091525f606082018181526080830182905260a0830182905260c083019190915281908152604080516080810182525f808252602082810182905292820181905260608201529101908152604080516080810182525f8082526020828101829052928201819052606082015291015290565b838152602080820184815260408084018581525f8981526007808652908390208651805182546001600160a01b03199081166001600160a01b039283161784558289015160018501805483169184169190911790558287015160028501805483169184169190911790556060928301516003850180548316918416919091179055965180516004850180548a16918416919091179055808901516005850180548a16918416919091179055808701516006850180548a16918416919091179055820151938301805488169482169490941790935592518051600883018054881691851691909117905595860151600982018054871691841691909117905585840151600a8201805487169184169190911790559490910151600b90940180549093169316929092179055517f3f6be6ecf27b70c47cce9bb5e0025d1504a236f5930ebc3d49012bf666c93f1d906133da908790879087908790615d2c565b60405180910390a15050505050565b606081831061340b57604051631960ccad60e11b815260040160405180910390fd5b5f80613416600b5490565b9050600185101561342657600194505b80841115613432578093505b5f61343c87612ba3565b90508486101561345b5785850381811015613455578091505b5061345e565b505f5b5f816001600160401b0381111561347757613477615068565b6040519080825280602002602001820160405280156134a0578160200160208202803683370190505b509050815f036134b557935061356292505050565b5f6134bf88614009565b90505f81604001516134cf575080515b885b8881141580156134e15750848714155b15613556576134ef81614a30565b9250826040015161354e5782516001600160a01b03161561350f57825191505b8a6001600160a01b0316826001600160a01b03160361354e578084888060010199508151811061354157613541615b3a565b6020026020010181815250505b6001016134d1565b50505092835250909150505b9392505050565b805f8111801561357b57506018548111155b6135b85760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015260640161151a565b601754816135c46114c1565b6135ce9190614f44565b11156136095760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b604482015260640161151a565b815f613613611bd2565b905061361f8183615cbd565b3410156136605760405162461bcd60e51b815260206004820152600f60248201526e446566696369656e742066756e647360881b604482015260640161151a565b60195460ff16156136a45760405162461bcd60e51b815260206004820152600e60248201526d135a5b9d081a5cc81c185d5cd95960921b604482015260640161151a565b6136ad33612e73565b80156136c25750601354600160a01b900460ff165b156136f85760405162461bcd60e51b81526020600482015260066024820152651b1bd8dad95960d21b604482015260640161151a565b6013545f90600160a01b900460ff16613711575f613714565b60015b60ff1690505f816003546137289190614f44565b90506137343387614a6a565b335f908152601d60205260408120829055805b5f838152601e60205260409020548110156137b2575f838152601e6020526040902080543391908390811061377e5761377e615b3a565b5f918252602090912001546001600160a01b0316036137a057600191506137b2565b806137aa81615bd9565b915050613747565b50806137e6575f828152601e602090815260408220805460018101825590835291200180546001600160a01b031916331790555b5f828152601c602052604081208054349290613803908490614f44565b909155503390507f25b428dfde728ccfaddad7e29e4ac23c24ed7fd1a6e3e3f91894a9a073f5dfff886138346114c1565b6040805192835260208301919091520160405180910390a250505050505050565b335f8181526012602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b5f82815260056020526040812082516060929190849083906138e4576138e4615b3a565b60200260200101516040516138f9919061590b565b908152604051908190036020019020546001600160a01b0316036139515760405162461bcd60e51b815260206004820152600f60248201526e15da5b9b995c9cc81b9bdd081cd95d608a1b604482015260640161151a565b5f82516001600160401b0381111561396b5761396b615068565b6040519080825280602002602001820160405280156139b457816020015b604080516060810182525f80825260208083018290529282015282525f199092019101816139895790505b5090505f5b8351811015611e15575f85815260056020526040902084518590839081106139e3576139e3615b3a565b60200260200101516040516139f8919061590b565b90815260408051918290036020908101832060608401835280546001600160a01b03908116855260018201548116928501929092526002015416908201528251839083908110613a4a57613a4a615b3a565b60200260200101819052508080613a6090615bd9565b9150506139b9565b5f828152601f602090815260408083206001600160a01b038516845282529182902080548351818402810184019094528084526060939283018282801561289257602002820191905f5260205f209081548152602001906001019080831161287e575050505050905092915050565b613adf614892565b601855565b613aec614892565b600160095f8581526020019081526020015f2083604051613b0d919061590b565b90815260408051602092819003830181206001600160a01b0386165f90815293529120805460ff1916921515929092179091557ff6587e9ff1b3716caba7b2b276ab87a83b9a624760c75b978846a5dd29c1b821906119e490859085908590615bf1565b6021602052815f5260405f208181548110612ade575f80fd5b5f838152600860205260408082209051613ba590859061590b565b908152604080519182900360209081019092206001600160a01b0385165f908152925290205460ff1690509392505050565b613be28484846117c6565b6001600160a01b0383163b15613c1b57613bfe84848484614a87565b613c1b576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b601f602052825f5260405f20602052815f5260405f208181548110611bbf575f80fd5b613c4c614892565b6003548114613c8c5760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b2b0b9b7b760a11b604482015260640161151a565b5f5b5f82815260216020526040902054811015613df2575f828152602160205260408120805483908110613cc257613cc2615b3a565b5f9182526020822001546001600160a01b03169150613ce082612ba3565b90505f81118015613d0757506001600160a01b0382165f908152601d602052604090205484145b15613ddd57604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa158015613d4d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052613d749190810190615b4e565b5f858152602080805260408083206001600160a01b038716845282529091208251613da59391929190910190614ebc565b505f8481526022602090815260408220805460018101825590835291200180546001600160a01b0319166001600160a01b0384161790555b50508080613dea90615bd9565b915050613c8e565b50613dfd6001611108565b6040518181527ffbb075c42ca347b78331c9c8496fbb654104e60704c8238bf4d36eb1593989d790602001611161565b5f613e36611bd2565b601354909150600160a01b900460ff1615613e835760405162461bcd60e51b815260206004820152600d60248201526c14d9585cdbdb881b1bd8dad959609a1b604482015260640161151a565b6001613e8e33612ba3565b1015613ec45760405162461bcd60e51b81526020600482015260056024820152640c0813919560da1b604482015260640161151a565b600354335f908152601d602052604090205403613f235760405162461bcd60e51b815260206004820152601760248201527f416c7265616479207061696420736561736f6e20666565000000000000000000604482015260640161151a565b80341015613f665760405162461bcd60e51b815260206004820152601060248201526f2737ba1032b737bab3b41022ba3432b960811b604482015260640161151a565b60038054335f818152601d60209081526040808320859055938252601e815283822080546001810182559083528183200180546001600160a01b03191690931790925592548352601c905281208054839290613fc3908490614f44565b909155505060035460408051338152602081019290925281018290527febde69485665a3adf8d26912798b811ae2db1a75c07defd73d48fc47db99785790606001611161565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f80825260208201819052918101829052606081019190915260018310806140605750600b548310155b1561406b5792915050565b61407483614a30565b90508060400151156140865792915050565b61356283614b6f565b606061409a826148eb565b6140d15760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b604482015260640161151a565b5f6140da614ba3565b90505f8151116140f85760405180602001604052805f815250613562565b8061410284614bb2565b601660405160200161411693929190615d5c565b6040516020818303038152906040529392505050565b614134614892565b604080516060810182526001600160a01b038581168252848116602080840191909152908416828401525f888152600590915282902091519091829161417b90889061590b565b9081526040805160209281900383018120845181546001600160a01b03199081166001600160a01b03928316178355948601516001830180548716918316919091179055949092015160029092018054909316919093161790557f6920e51a876be9823a94c47743fcd58300bd2b1096de83763b2e96bca14060b69061420a9088908890889088908890615d8d565b60405180910390a1505050505050565b604080516060810182525f80825260208201819052918101829052819081905f86815260056020526040908190209051612d5890879061590b565b5f838152600960205260408082209051613ba590859061590b565b601a818154811061427f575f80fd5b905f5260205f20015f91509050805461220b906158d9565b61429f614892565b604080516060810182526001600160a01b038581168252848116602080840191909152908416828401525f88815260069091528290209151909182916142e690889061590b565b9081526040805160209281900383018120845181546001600160a01b03199081166001600160a01b03928316178355948601516001830180548716918316919091179055949092015160029092018054909316919093161790557fc8944446876ea5e2d36f9393ccbae6fab404b80804e2c23678f1d058995796da9061420a9088908890889088908890615d8d565b815f8111801561438757506018548111155b6143c45760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b604482015260640161151a565b601754816143d06114c1565b6143da9190614f44565b11156144155760405162461bcd60e51b815260206004820152600a6024820152694d617820737570706c7960b01b604482015260640161151a565b61441d614892565b6144278284614a6a565b816001600160a01b03167f8e0967594cd36a9792b80109735e3dde4394a465815a0337061942b21ccad63c8461445b6114c1565b6040805192835260208301919091520160405180910390a2505050565b614480614892565b6001600160a01b0381166144e55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161151a565b6121fb816149e1565b6144f6614892565b601354600160a81b900460ff1615614625575f818152602080805260408083206001600160a01b0386168452909152902054156145455760405162461bcd60e51b815260040161151a90615dcf565b5f61454f83612ba3565b1161456c5760405162461bcd60e51b815260040161151a90615df9565b604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156145ad573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526145d49190810190615b4e565b5f828152602080805260408083206001600160a01b0387168452825290912082516146059391929190910190614ebc565b506001600160a01b0382165f908152601d60205260409020819055614853565b601354600160a01b900460ff1615614738575f818152601f602090815260408083206001600160a01b0386168452909152902054156146765760405162461bcd60e51b815260040161151a90615dcf565b5f61468083612ba3565b1161469d5760405162461bcd60e51b815260040161151a90615df9565b604051632118854760e21b81526001600160a01b03831660048201523090638462151c906024015f60405180830381865afa1580156146de573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526147059190810190615b4e565b5f828152601f602090815260408083206001600160a01b0387168452825290912082516146059391929190910190614ebc565b6001600160a01b0382165f908152601d602052604090205481900361476f5760405162461bcd60e51b815260040161151a90615dcf565b5f61477983612ba3565b116147965760405162461bcd60e51b815260040161151a90615df9565b6001600160a01b0382165f908152601d60205260408120829055805b5f838152601e602052604090205481101561481d575f838152601e602052604090208054339190839081106147e9576147e9615b3a565b5f918252602090912001546001600160a01b03160361480b576001915061481d565b8061481581615bd9565b9150506147b2565b5080614851575f828152601e602090815260408220805460018101825590835291200180546001600160a01b031916331790555b505b604080516001600160a01b0384168152602081018390527ff455acd0a554ca90e7c2ae9037901c932fe91c38fbdd2b985d2b1af020fa66639101611afb565b5f546001600160a01b03163314612c005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161151a565b5f816001111580156148fe5750600b5482105b80156111025750505f908152600f6020526040902054600160e01b161590565b5f818060011161496f57600b5481101561496f575f818152600f602052604081205490600160e01b8216900361496d575b805f0361356257505f19015f818152600f602052604090205461494f565b505b604051636f96cda160e11b815260040160405180910390fd5b6002600154036149da5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161151a565b6002600155565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f828152600f602052604090205461110290614c41565b614a83828260405180602001604052805f815250614c88565b5050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290614abb903390899088908890600401615e1c565b6020604051808303815f875af1925050508015614af5575060408051601f3d908101601f19168201909252614af291810190615e58565b60015b614b51573d808015614b22576040519150601f19603f3d011682016040523d82523d5f602084013e614b27565b606091505b5080515f03614b49576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152611102614b9e8361491e565b614c41565b60606015805461117b906158d9565b60605f614bbe83614cec565b60010190505f816001600160401b03811115614bdc57614bdc615068565b6040519080825280601f01601f191660200182016040528015614c06576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084614c1057509392505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b614c928383614dc3565b6001600160a01b0383163b156113bd57600b548281035b614cbb5f868380600101945086614a87565b614cd8576040516368d2bf6b60e11b815260040160405180910390fd5b818110614ca95781600b5414612829575f80fd5b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310614d2a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614d56576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310614d7457662386f26fc10000830492506010015b6305f5e1008310614d8c576305f5e100830492506008015b6127108310614da057612710830492506004015b60648310614db2576064830492506002015b600a83106111025760010192915050565b600b545f829003614de75760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383165f8181526010602090815260408083208054680100000000000000018802019055848352600f90915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114614e935780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101614e5d565b50815f03614eb357604051622e076360e81b815260040160405180910390fd5b600b5550505050565b828054828255905f5260205f20908101928215614ef5579160200282015b82811115614ef5578251825591602001919060010190614eda565b50614f01929150614f1c565b5090565b5080545f8255905f5260205f20908101906121fb91905b5b80821115614f01575f8155600101614f1d565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561110257611102614f30565b6001600160e01b0319811681146121fb575f80fd5b5f60208284031215614f7c575f80fd5b813561356281614f57565b80358015158114614f96575f80fd5b919050565b5f60208284031215614fab575f80fd5b61356282614f87565b5f5b83811015614fce578181015183820152602001614fb6565b50505f910152565b5f8151808452614fed816020860160208601614fb4565b601f01601f19169290920160200192915050565b602081525f6135626020830184614fd6565b5f60208284031215615023575f80fd5b5035919050565b6001600160a01b03811681146121fb575f80fd5b5f806040838503121561504f575f80fd5b823561505a8161502a565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156150a4576150a4615068565b604052919050565b5f6001600160401b038311156150c4576150c4615068565b6150d7601f8401601f191660200161507c565b90508281528383830111156150ea575f80fd5b828260208301375f602084830101529392505050565b5f82601f83011261510f575f80fd5b613562838335602085016150ac565b5f806040838503121561512f575f80fd5b82356001600160401b0380821115615145575f80fd5b61515186838701615100565b93506020850135915080821115615166575f80fd5b5061517385828601615100565b9150509250929050565b602080825282518282018190525f9190848201906040850190845b818110156130f15783516001600160a01b031683529284019291840191600101615198565b5f602082840312156151cd575f80fd5b81356001600160401b038111156151e2575f80fd5b614b6784828501615100565b5f805f60608486031215615200575f80fd5b833561520b8161502a565b9250602084013561521b8161502a565b929592945050506040919091013590565b5f805f6060848603121561523e575f80fd5b8335925060208401356001600160401b0381111561525a575f80fd5b61526686828701615100565b92505060408401356152778161502a565b809150509250925092565b5f8060408385031215615293575f80fd5b8235915060208301356001600160401b038111156152af575f80fd5b61517385828601615100565b5f805f606084860312156152cd575f80fd5b83359250602084013561521b8161502a565b5f6001600160401b038211156152f7576152f7615068565b5060051b60200190565b5f8060408385031215615312575f80fd5b823591506020808401356001600160401b0380821115615330575f80fd5b818601915086601f830112615343575f80fd5b8135615356615351826152df565b61507c565b81815260059190911b83018401908481019089831115615374575f80fd5b8585015b838110156153ab5780358581111561538f575f8081fd5b61539d8c89838a0101615100565b845250918601918601615378565b508096505050505050509250929050565b602080825282518282018190525f919060409081850190868401855b8281101561541657815180516001600160a01b03908116865287820151811688870152908601511685850152606090930192908501906001016153d8565b5091979650505050505050565b5f60208284031215615433575f80fd5b81356135628161502a565b5f805f805f60a08688031215615452575f80fd5b853561545d8161502a565b94506020860135935060408601356001600160401b0381111561547e575f80fd5b61548a88828901615100565b9598949750949560608101359550608001359392505050565b5f80604083850312156154b4575f80fd5b8235915060208301356154c68161502a565b809150509250929050565b602080825282518282018190525f9190848201906040850190845b818110156130f1578351835292840192918401916001016154ec565b5f8060208385031215615519575f80fd5b82356001600160401b038082111561552f575f80fd5b818501915085601f830112615542575f80fd5b813581811115615550575f80fd5b8660208260051b8501011115615564575f80fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156130f1576155e0838551615576565b92840192608092909201916001016155cd565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b610180810161563582866155f3565b61564260808301856155f3565b614b676101008301846155f3565b5f8060408385031215615661575f80fd5b50508035926020909101359150565b5f60808284031215615680575f80fd5b604051608081018181106001600160401b03821117156156a2576156a2615068565b60405290508082356156b38161502a565b815260208301356156c38161502a565b602082015260408301356156d68161502a565b604082015260608301356156e98161502a565b6060919091015292915050565b5f805f806101a0858703121561570a575f80fd5b8435935061571b8660208701615670565b925061572a8660a08701615670565b915061573a866101208701615670565b905092959194509250565b5f805f60608486031215615757575f80fd5b83356157628161502a565b95602085013595506040909401359392505050565b5f8060408385031215615788575f80fd5b82356157938161502a565b91506157a160208401614f87565b90509250929050565b5f805f80608085870312156157bd575f80fd5b84356157c88161502a565b935060208501356157d88161502a565b92506040850135915060608501356001600160401b038111156157f9575f80fd5b8501601f81018713615809575f80fd5b615818878235602084016150ac565b91505092959194509250565b608081016111028284615576565b5f805f805f60a08688031215615846575f80fd5b8535945060208601356001600160401b03811115615862575f80fd5b61586e88828901615100565b945050604086013561587f8161502a565b9250606086013561588f8161502a565b9150608086013561589f8161502a565b809150509295509295909350565b5f80604083850312156158be575f80fd5b82356158c98161502a565b915060208301356154c68161502a565b600181811c908216806158ed57607f821691505b602082108103611aa457634e487b7160e01b5f52602260045260245ffd5b5f825161591c818460208701614fb4565b9190910192915050565b5f8154615932816158d9565b6001828116801561594a576001811461595f5761598b565b60ff198416875282151583028701945061598b565b855f526020805f205f5b858110156159825781548a820152908401908201615969565b50505082870194505b5050505092915050565b5f6135628284615926565b601f8211156113bd575f81815260208120601f850160051c810160208610156159c65750805b601f850160051c820191505b8181101561194f578281556001016159d2565b81516001600160401b038111156159fe576159fe615068565b615a1281615a0c84546158d9565b846159a0565b602080601f831160018114615a45575f8415615a2e5750858301515b5f19600386901b1c1916600185901b17855561194f565b5f85815260208120601f198616915b82811015615a7357888601518255948401946001909101908401615a54565b5085821015615a9057878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b604081525f808454615ab1816158d9565b806040860152606060018084165f8114615ad25760018114615aec57615b1a565b60ff1985168884015283151560051b880183019550615b1a565b895f526020805f205f5b86811015615b115781548b8201870152908401908201615af6565b8a018501975050505b50505050508281036020840152615b318185614fd6565b95945050505050565b634e487b7160e01b5f52603260045260245ffd5b5f6020808385031215615b5f575f80fd5b82516001600160401b03811115615b74575f80fd5b8301601f81018513615b84575f80fd5b8051615b92615351826152df565b81815260059190911b82018301908381019087831115615bb0575f80fd5b928401925b82841015615bce57835182529284019290840190615bb5565b979650505050505050565b5f60018201615bea57615bea614f30565b5060010190565b838152606060208201525f615c096060830185614fd6565b905060018060a01b0383166040830152949350505050565b805169ffffffffffffffffffff81168114614f96575f80fd5b5f805f805f60a08688031215615c4e575f80fd5b615c5786615c21565b9450602086015193506040860151925060608601519150615c7a60808701615c21565b90509295509295909350565b828152604060208201525f614b676040830184614fd6565b5f82615cb857634e487b7160e01b5f52601260045260245ffd5b500490565b808202811582820484141761110257611102614f30565b6020808252600a90820152692737ba103bb4b73732b960b11b604082015260600190565b848152608060208201525f615d106080830186614fd6565b6001600160a01b03949094166040830152506060015292915050565b8481526101a08101615d4160208301866155f3565b615d4e60a08301856155f3565b615b316101208301846155f3565b5f8451615d6d818460208901614fb4565b845190830190615d81818360208901614fb4565b615bce81830186615926565b85815260a060208201525f615da560a0830187614fd6565b6001600160a01b039586166040840152938516606083015250921660809092019190915292915050565b60208082526010908201526f283630bcb2b91034b71039b2b0b9b7b760811b604082015260600190565b602080825260099082015268042616c616e636520360bc1b604082015260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90615e4e90830184614fd6565b9695505050505050565b5f60208284031215615e68575f80fd5b815161356281614f5756fea2646970667358221220ded47ee65e7c5a114a30b3ebc26da4c29f3b6be8633f038f2581a80f913a5ff664736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84190000000000000000000000000000000000000000000000000000000000000006484f5354443400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004484f535400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _tokenName (string): HOSTD4
Arg [1] : _tokenSymbol (string): HOST
Arg [2] : _maxSupply (uint256): 20000
Arg [3] : _maxMintAmountPerTx (uint256): 1
Arg [4] : _priceFeed (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000004e20
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [6] : 484f535444340000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 484f535400000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $3,268.89 | 0.0328 | $107.37 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.