Token MuMuKoiFish
Overview ERC-721
Total Supply:
1,000 MuMuKoiFish
Holders:
444 addresses
Transfers:
-
Contract:
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MuMuKoiFishNFT
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 300 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "./Apetimism.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address _to, uint256 _amount) external returns (bool); } contract MuMuKoiFishNFT is ERC721AQueryable, ERC2981, Ownable, Pausable, ReentrancyGuard, Apetimism { event Received(address, uint); event RoundChanged(uint8); event TotalMintedChanged(uint256); ////////////// // Constants ////////////// uint256 public MAX_SUPPLY = 1000; uint256 public TEAM_NFT_COUNT = 0; uint256 public START_TOKEN_ID = 1; string private constant TOKEN_NAME = "MuMuKoiFish"; string private constant TOKEN_SYMBOL = "MuMuKoiFish"; ////////////// // Internal ////////////// string private _baseURIExtended; bool private _isTeamNFTsMinted = false; address private _signer; mapping(address => uint256) private _addressTokenMinted; mapping(address => mapping(uint8 => uint256)) private _addressTokenMintedInRound; mapping(address => mapping(int16 => uint256)) private _addressTokenMintedInRole; mapping(uint256 => uint8) private _nonces; ///////////////////// // Public Variables ///////////////////// uint8 public currentRound = 0; address public teamAddress; bool public metadataFrozen = false; uint16 public maxMintPerTx = 5; uint16 public maxMintPerAddress = 5; mapping(int16 => uint256) mintPriceByRole; struct Role { string name; int16 role_id; uint256 max_mint; uint256 mint_price; bool exists; } mapping(uint16 => mapping(uint8 => mapping(int16 => Role))) public allowedRolesInRound; mapping(uint16 => mapping(uint8 => uint16)) public allowedRolesInRoundCount; mapping(uint16 => mapping(uint8 => int16[])) public allowedRolesInRoundArr; uint8[] public availableRounds; mapping(uint16 => mapping(uint8 => uint256)) public roundAllocations; mapping(uint16 => mapping(int16 => uint256)) public roleAllocations; mapping(uint8 => uint256) public totalMintedInRound; uint16 private allowedRolesInRoundSetId = 0; uint16 private roundAllocationsSetId = 0; uint16 private roleAllocationsSetId = 0; //////////////// // Parameters //////////////// struct RoleInRoundParams { uint8 round; int16 role; string roleName; uint256 maxMint; uint256 mintPrice; } struct RoundAllocationParams { uint8 round; uint256 allocation; } struct RoleAllocationParams { int16 role; uint256 allocation; } //////////////// // Actual Code //////////////// constructor(address apetimismAddress_) ERC721A(TOKEN_NAME, TOKEN_SYMBOL) Apetimism(apetimismAddress_, 500) { } function _startTokenId() internal view virtual override returns (uint256) { return START_TOKEN_ID; } ////////////////////// // Setters for Owner ////////////////////// function initialize( address teamAddress_, address signerAddress_, string memory baseURI_, address receiver_, uint96 feeNumerator_, uint16 maxMintPerTx_, uint16 maxMintPerAddress_, RoleInRoundParams[] memory rolesInRound_, RoundAllocationParams[] memory roundAllocations_, RoleAllocationParams[] memory roleAllocations_ ) public onlyOwner { setTeamAddress(teamAddress_); setSignerAddress(signerAddress_); setBaseURI(baseURI_); setDefaultRoyalty(receiver_, feeNumerator_); setMaxMintPerTx(maxMintPerTx_); setMaxMintPerAddress(maxMintPerAddress_); addAllowedRolesInRound(rolesInRound_, true); addRoundsAllocation(roundAllocations_, true); addRolesAllocation(roleAllocations_, true); } function setCurrentRound(uint8 round_) public onlyOwner { currentRound = round_; emit RoundChanged(round_); } function setTeamAddress(address addr) public onlyOwner { teamAddress = addr; } function setSignerAddress(address addr) public onlyOwner { _signer = addr; } function setMaxMintPerTx(uint16 count) public onlyOwner { maxMintPerTx = count; } function setMaxMintPerAddress(uint16 count) public onlyOwner { maxMintPerAddress = count; } function setBaseURI(string memory baseURI) public onlyOwner { require(!metadataFrozen, "Metadata has already been frozen"); _baseURIExtended = baseURI; } function addAllowedRolesInRound(RoleInRoundParams[] memory params, bool replace) public onlyOwner { if (replace) allowedRolesInRoundSetId++; for (uint i = 0; i < params.length; i++) { addAllowedRoleInRound( params[i].round, params[i].role, params[i].roleName, params[i].maxMint, params[i].mintPrice, false ); } } function addAllowedRoleInRound(uint8 round, int16 role, string memory roleName, uint256 maxMint, uint256 mintPrice, bool replace) public onlyOwner { if (replace) allowedRolesInRoundSetId++; bool role_already_existed = allowedRolesInRound[allowedRolesInRoundSetId][round][role].exists; allowedRolesInRound[allowedRolesInRoundSetId][round][role].name = roleName; allowedRolesInRound[allowedRolesInRoundSetId][round][role].role_id = role; allowedRolesInRound[allowedRolesInRoundSetId][round][role].max_mint = maxMint; allowedRolesInRound[allowedRolesInRoundSetId][round][role].mint_price = mintPrice; allowedRolesInRound[allowedRolesInRoundSetId][round][role].exists = true; if (role_already_existed) // Role already existed return; allowedRolesInRoundCount[allowedRolesInRoundSetId][round]++; allowedRolesInRoundArr[allowedRolesInRoundSetId][round].push(role); } function removeAllowedRoleInRound(uint8 round, int16 role) public onlyOwner { require(allowedRolesInRound[allowedRolesInRoundSetId][round][role].exists, "Role not existed"); allowedRolesInRound[allowedRolesInRoundSetId][round][role].name = ""; allowedRolesInRound[allowedRolesInRoundSetId][round][role].role_id = 0; allowedRolesInRound[allowedRolesInRoundSetId][round][role].max_mint = 0; allowedRolesInRound[allowedRolesInRoundSetId][round][role].mint_price = 0; allowedRolesInRound[allowedRolesInRoundSetId][round][role].exists = false; allowedRolesInRoundCount[allowedRolesInRoundSetId][round]--; // Remove available role for (uint8 i = 0; i < allowedRolesInRoundArr[allowedRolesInRoundSetId][round].length; i++) { if (allowedRolesInRoundArr[allowedRolesInRoundSetId][round][i] == role) { removeArrayAtInt16Index(allowedRolesInRoundArr[allowedRolesInRoundSetId][round], i); break; } } if (allowedRolesInRoundCount[allowedRolesInRoundSetId][round] == 0) { // Remove available round for (uint8 i = 0; i < availableRounds.length; i++) { if (availableRounds[i] == round) { removeArrayAtUint8Index(availableRounds, i); break; } } } } function addRoundsAllocation(RoundAllocationParams[] memory params, bool replace) public onlyOwner { if (replace) { roundAllocationsSetId++; delete availableRounds; } for (uint i = 0; i < params.length; i++) addRoundAllocation(params[i].round, params[i].allocation, false); } function addRoundAllocation(uint8 round, uint256 allocation, bool replace) public onlyOwner { if (replace) { roundAllocationsSetId++; delete availableRounds; } roundAllocations[roundAllocationsSetId][round] = allocation; bool found = false; for (uint8 i = 0; i < availableRounds.length; i++) if (availableRounds[i] == round) found = true; if (!found) availableRounds.push(round); } function addRolesAllocation(RoleAllocationParams[] memory params, bool replace) public onlyOwner { if (replace) roleAllocationsSetId++; for (uint i = 0; i < params.length; i++) addRoleAllocation(params[i].role, params[i].allocation, false); } function addRoleAllocation(int16 role, uint256 allocation, bool replace) public onlyOwner { if (replace) roleAllocationsSetId++; roleAllocations[roleAllocationsSetId][role] = allocation; } function freezeMetadata() public onlyOwner { metadataFrozen = true; } //////////// // Minting //////////// function mintTeamNFTs() public onlyOwner { require(teamAddress != address(0), "Team wallet not set"); require(!_isTeamNFTsMinted, "Already minted"); require(bytes(_baseURI()).length != 0, "baseURI not set"); if (TEAM_NFT_COUNT > 0) _safeMint(teamAddress, TEAM_NFT_COUNT); _isTeamNFTsMinted = true; } function mint(uint256 quantity, int16 role, uint256 nonce, uint8 v, bytes32 r, bytes32 s) external payable whenNotPaused nonReentrant { require(currentRound != 0, "Not started"); uint256 combined_nonce = nonce; if (role >= 0) combined_nonce = (nonce << 16) + uint16(role); require(_nonces[combined_nonce] == 0, "Duplicated nonce"); require(_recoverAddress(combined_nonce, v, r, s) == _signer, "Invalid signature"); bool is_public_round = allowedRolesInRound[allowedRolesInRoundSetId][currentRound][0].exists; int16 selected_role = 0; if (role >= 0) selected_role = role; if (!allowedRolesInRound[allowedRolesInRoundSetId][currentRound][selected_role].exists) { if (!is_public_round) require(false, "Not eligible"); selected_role = 0; } require(_isTeamNFTsMinted, "Not ready for public"); require(quantity > 0, "Quantity cannot be zero"); require(totalMinted() + quantity <= MAX_SUPPLY, "Cannot mint more than maximum supply"); if (role >= 0) require(maxMintableForTxForRole(msg.sender, role) >= quantity, "You have reached maximum allowed"); else require(maxMintableForTxForRole(msg.sender, 0) >= quantity, "You have reached maximum allowed"); require(mintableLeft() >= quantity, "Not enough NFT left to mint."); uint256 cost = quantity * allowedRolesInRound[allowedRolesInRoundSetId][currentRound][selected_role].mint_price; _nonces[combined_nonce] = 1; require(msg.value == cost, "Unmatched ether balance"); _safeMint(msg.sender, quantity); totalMintedInRound[currentRound] = totalMintedInRound[currentRound] + quantity; _addressTokenMinted[msg.sender] = _addressTokenMinted[msg.sender] + quantity; _addressTokenMintedInRound[msg.sender][currentRound] = _addressTokenMintedInRound[msg.sender][currentRound] + quantity; if (role >= 0) _addressTokenMintedInRole[msg.sender][role] = _addressTokenMintedInRole[msg.sender][role] + quantity; uint256 to_apetimism = msg.value * apetimismFee() / 10000; payable(apetimismAddress()).transfer(to_apetimism); totalRevenueShared = totalRevenueShared + to_apetimism; } function _recoverAddress(uint256 nonce, uint8 v, bytes32 r, bytes32 s) private pure returns (address) { bytes32 msgHash = keccak256(abi.encodePacked(nonce)); bytes32 messageDigest = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", msgHash)); return ecrecover(messageDigest, v, r, s); } //////////////// // Transfering //////////////// function transfersFrom( address from, address to, uint256[] calldata tokenIds ) public virtual { for (uint i = 0; i < tokenIds.length; i++) transferFrom(from, to, tokenIds[i]); } function safeTransfersFrom( address from, address to, uint256[] calldata tokenIds ) public virtual { for (uint i = 0; i < tokenIds.length; i++) safeTransferFrom(from, to, tokenIds[i]); } function safeTransfersFrom( address from, address to, uint256[] calldata tokenIds, bytes memory _data ) public virtual { for (uint i = 0; i < tokenIds.length; i++) safeTransferFrom(from, to, tokenIds[i], _data); } ////////////// // Pausable ////////////// function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } /////////////////// // Internal Views /////////////////// function _baseURI() internal view virtual override returns (string memory) { return _baseURIExtended; } ///////////////// // Public Views ///////////////// function getAllAvailableRounds() public view returns (uint8[] memory) { uint256 len = availableRounds.length; uint8[] memory ret = new uint8[](len); for (uint i = 0; i < len; i++) ret[i] = availableRounds[i]; return ret; } function getAllowedRolesInRoundArr(uint8 round) public view returns (int16[] memory) { uint256 len = allowedRolesInRoundArr[allowedRolesInRoundSetId][round].length; int16[] memory ret = new int16[](len); for (uint i = 0; i < len; i++) ret[i] = allowedRolesInRoundArr[allowedRolesInRoundSetId][round][i]; return ret; } function mintPriceForCurrentRoundForRole(int16 role) public view returns (uint256) { return allowedRolesInRound[allowedRolesInRoundSetId][currentRound][role].mint_price; } function maxMintableForRole(address addr, int16 role) public view virtual returns (uint256) { uint256 minted = _addressTokenMinted[addr]; uint256 max_mint = 0; // Not yet started if (currentRound == 0) return 0; // Total minted in this round reach the maximum allocated if (totalMintedInRound[currentRound] >= roundAllocations[roundAllocationsSetId][currentRound]) return 0; if (_addressTokenMintedInRole[addr][role] >= roleAllocations[roleAllocationsSetId][role]) return 0; if (allowedRolesInRound[allowedRolesInRoundSetId][currentRound][role].exists) max_mint = allowedRolesInRound[allowedRolesInRoundSetId][currentRound][role].max_mint; // Hit the maximum per wallet if (minted >= maxMintPerAddress) return 0; // Cannot mint more for this round if (_addressTokenMintedInRound[addr][currentRound] >= max_mint) return 0; // Prevent underflow if (totalMintedInRound[currentRound] >= roundAllocations[roundAllocationsSetId][currentRound]) return 0; // Cannot mint more than allocated for role if (_addressTokenMintedInRole[addr][role] >= roleAllocations[roleAllocationsSetId][role]) return 0; uint256 wallet_quota_left = maxMintPerAddress - minted; uint256 round_quota_left = max_mint - _addressTokenMintedInRound[addr][currentRound]; uint256 round_allocation_quota_left = roundAllocations[roundAllocationsSetId][currentRound] - totalMintedInRound[currentRound]; uint256 role_quota_left = roleAllocations[roleAllocationsSetId][role] - _addressTokenMintedInRole[addr][role]; return min(mintableLeft(), min(min(min(wallet_quota_left, round_quota_left), round_allocation_quota_left), role_quota_left)); } function maxMintableForTxForRole(address addr, int16 role) public view virtual returns (uint256) { uint256 mintable = maxMintableForRole(addr, role); if (mintable > maxMintPerTx) return maxMintPerTx; return mintable; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token'); return bytes(_baseURI()).length != 0 ? string(abi.encodePacked(_baseURI(), Strings.toString(tokenId), ".json")) : ''; } function totalMinted() public view returns (uint256) { return _totalMinted(); } function mintableLeft() public view returns (uint256) { return MAX_SUPPLY - totalMinted(); } //////////// // Helpers //////////// function removeArrayAtInt16Index(int16[] storage array, uint256 index) private { for (uint i = index; i < array.length - 1; i++) array[i] = array[i + 1]; delete array[array.length - 1]; array.pop(); } function removeArrayAtUint8Index(uint8[] storage array, uint256 index) private { for (uint i = index; i < array.length - 1; i++) array[i] = array[i + 1]; delete array[array.length - 1]; array.pop(); } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } //////////// // ERC2981 //////////// function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { return super.supportsInterface(interfaceId) || ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function deleteDefaultRoyalty() public onlyOwner { _deleteDefaultRoyalty(); } function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public onlyOwner { _setTokenRoyalty(tokenId, receiver, feeNumerator); } function resetTokenRoyalty(uint256 tokenId) public onlyOwner { _resetTokenRoyalty(tokenId); } /////////////// // Withdrawal /////////////// function withdraw() public onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } function withdrawToken(address tokenAddress) public onlyOwner { IERC20 tokenContract = IERC20(tokenAddress); tokenContract.transfer(msg.sender, tokenContract.balanceOf(address(this))); } ///////////// // Fallback ///////////// receive() external payable { emit Received(msg.sender, msg.value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721A Queryable * @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` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _currentIndex) { return ownership; } ownership = _ownerships[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[] memory tokenIds) external view 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 override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _currentIndex; // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, _currentIndex)`. 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 = _ownerships[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 pfp collections should be fine). */ function tokensOfOwner(address owner) external view 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 = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; abstract contract Apetimism is Context { address private _apetimismAddress; uint256 private _apetimismFee = 500; uint256 public totalRevenueShared = 0; event ApetimismAddressTransferred(address indexed previousAddress, address indexed newAddress); /** * @dev Initializes the contract setting the initial apetimism address. */ constructor(address _address, uint256 _fee) { _transferApetimism(_address); _apetimismFee = _fee; } /** * @dev Throws if called by any account other than the apetimism address. */ modifier onlyApetimism() { _checkApetimismAddress(); _; } /** * @dev Returns the address of the current apetimism address. */ function apetimismAddress() public view virtual returns (address) { return _apetimismAddress; } /** * @dev Throws if the sender is not the apetimism address. */ function _checkApetimismAddress() internal view virtual { require(apetimismAddress() == _msgSender(), "Apetimism: caller is not the apetimism address"); } /** * @dev Leaves the contract without apetimism address. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current apetimism address. */ function renounceApetimism() public virtual onlyApetimism { _transferApetimism(address(0)); } /** * @dev Transfers apetimism address of the contract to a new address (`newAddress`). * Can only be called by the current apetimism address. */ function transferApetimism(address newAddress) public virtual onlyApetimism { require(newAddress != address(0), "Apetimism: new address is the zero address"); _transferApetimism(newAddress); } /** * @dev Transfers apetimism address of the contract to a new address (`newAddress`). * Internal function without access restriction. */ function _transferApetimism(address newAddress) internal virtual { address oldAddress = _apetimismAddress; _apetimismAddress = newAddress; emit ApetimismAddressTransferred(oldAddress, newAddress); } function apetimismFee() public view virtual returns (uint256) { return _apetimismFee; } function setApetimismFee(uint256 newFee) public onlyApetimism { _apetimismFee = newFee; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of an ERC721AQueryable compliant contract. */ 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` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ 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 pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721A { using Address for address; using Strings for uint256; // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A is IERC721, IERC721Metadata { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 300 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"apetimismAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ApetimismAddressTransferred","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"","type":"uint8"}],"name":"RoundChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"TotalMintedChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"START_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_NFT_COUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"string","name":"roleName","type":"string"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addAllowedRoleInRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"string","name":"roleName","type":"string"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoleInRoundParams[]","name":"params","type":"tuple[]"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addAllowedRolesInRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int16","name":"role","type":"int16"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addRoleAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"int16","name":"role","type":"int16"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoleAllocationParams[]","name":"params","type":"tuple[]"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addRolesAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addRoundAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoundAllocationParams[]","name":"params","type":"tuple[]"},{"internalType":"bool","name":"replace","type":"bool"}],"name":"addRoundsAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"int16","name":"","type":"int16"}],"name":"allowedRolesInRound","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"int16","name":"role_id","type":"int16"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"uint256","name":"mint_price","type":"uint256"},{"internalType":"bool","name":"exists","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedRolesInRoundArr","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"allowedRolesInRoundCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apetimismAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apetimismFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableRounds","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRound","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","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":"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":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllAvailableRounds","outputs":[{"internalType":"uint8[]","name":"","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"}],"name":"getAllowedRolesInRoundArr","outputs":[{"internalType":"int16[]","name":"","type":"int16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"teamAddress_","type":"address"},{"internalType":"address","name":"signerAddress_","type":"address"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"address","name":"receiver_","type":"address"},{"internalType":"uint96","name":"feeNumerator_","type":"uint96"},{"internalType":"uint16","name":"maxMintPerTx_","type":"uint16"},{"internalType":"uint16","name":"maxMintPerAddress_","type":"uint16"},{"components":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"string","name":"roleName","type":"string"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoleInRoundParams[]","name":"rolesInRound_","type":"tuple[]"},{"components":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoundAllocationParams[]","name":"roundAllocations_","type":"tuple[]"},{"components":[{"internalType":"int16","name":"role","type":"int16"},{"internalType":"uint256","name":"allocation","type":"uint256"}],"internalType":"struct MuMuKoiFishNFT.RoleAllocationParams[]","name":"roleAllocations_","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerAddress","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerTx","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"int16","name":"role","type":"int16"}],"name":"maxMintableForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"int16","name":"role","type":"int16"}],"name":"maxMintableForTxForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"int16","name":"role","type":"int16"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"int16","name":"role","type":"int16"}],"name":"mintPriceForCurrentRoundForRole","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintTeamNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintableLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"int16","name":"role","type":"int16"}],"name":"removeAllowedRoleInRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceApetimism","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"int16","name":"","type":"int16"}],"name":"roleAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"roundAllocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"safeTransfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setApetimismFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round_","type":"uint8"}],"name":"setCurrentRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"}],"name":"setMaxMintPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"count","type":"uint16"}],"name":"setMaxMintPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setTeamAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"totalMintedInRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRevenueShared","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":"newAddress","type":"address"}],"name":"transferApetimism","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"transfersFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526101f4600d556000600e8190556103e8600f5560105560016011556013805460ff191690556018805460ff64ffffffffff60a81b0119166205000560b01b1790556021805465ffffffffffff191690553480156200006157600080fd5b5060405162005ee038038062005ee083398101604081905262000084916200026d565b604080518082018252600b8082526a09aea9aea96ded28cd2e6d60ab1b60208084018281528551808701909652928552840152815184936101f493929091620000d091600291620001c7565b508051620000e6906003906020840190620001c7565b505060115460005550620000fa3362000123565b600a805460ff60a01b191690556001600b55620001178262000175565b600d5550620002dc9050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b828054620001d5906200029f565b90600052602060002090601f016020900481019282620001f9576000855562000244565b82601f106200021457805160ff191683800117855562000244565b8280016001018555821562000244579182015b828111156200024457825182559160200191906001019062000227565b506200025292915062000256565b5090565b5b8082111562000252576000815560010162000257565b6000602082840312156200028057600080fd5b81516001600160a01b03811681146200029857600080fd5b9392505050565b600181811c90821680620002b457607f821691505b60208210811415620002d657634e487b7160e01b600052602260045260246000fd5b50919050565b615bf480620002ec6000396000f3fe60806040526004361061046c5760003560e01c8063894760691161024a578063b6a7412111610139578063d047d038116100b6578063e985e9c51161007a578063e985e9c514610e7a578063f2fde38b14610ec3578063f5a4156c14610ee3578063fb3cc6c214610f1b578063fe2e66f414610f3c57600080fd5b8063d047d03814610dcb578063d0950e7414610e03578063d111515d14610e23578063d324f37214610e38578063de7fcb1d14610e5857600080fd5b8063bf65eb34116100fd578063bf65eb3414610d2b578063c23dc68f14610d4b578063c87b56dd14610d78578063cb0010fa14610d98578063cf502d0d14610dab57600080fd5b8063b6a7412114610c62578063b88d4fde14610c82578063ba1402d314610ca2578063bd8fc4a214610cc2578063be56844814610cfe57600080fd5b8063a13429a9116101c7578063aab16cfc1161018b578063aab16cfc14610bd6578063ac7dc68d14610bf8578063b1ad048c14610c0d578063b1e8dbaa14610c2d578063b649270614610c4d57600080fd5b8063a13429a914610b4c578063a22cb46514610b6c578063a2309ff814610b8c578063a77a8c8514610ba1578063aa1b103f14610bc157600080fd5b806395d89b411161020e57806395d89b4114610aa657806399a2557a14610abb5780639cb18d3714610adb5780639e8cc8d314610afb578063a05714ce14610b2c57600080fd5b806389476069146109fc57806389b5a8c214610a1c5780638a19c8bc14610a3c5780638a616bc014610a685780638da5cb5b14610a8857600080fd5b80633e8f18f0116103665780636324559b116102e3578063715018a6116102a7578063715018a61461096f57806379a2c3f8146109845780638456cb59146109a45780638462151c146109b957806387f65c91146109e657600080fd5b80636324559b146108dc5780636352211e146108fa5780636690864e1461091a5780636e56431c1461093a57806370a082311461094f57600080fd5b806355f804b31161032a57806355f804b31461081b578063572849c41461083b5780635944c753146108705780635bbb2177146108905780635c975abb146108bd57600080fd5b80633e8f18f0146107685780633f4ba83a146107bb57806342842e0e146107d057806346830628146107f057806351dc26901461080657600080fd5b8063183ab264116103f45780632a55205a116103b85780632a55205a146106be57806332ab9bbe146106fd57806332cb6b0c1461071d57806333ee7927146107335780633ccfd60b1461075357600080fd5b8063183ab264146105fa5780631c75f0851461061a57806321120f7a1461063f57806323b872dd1461067257806327854c151461069257600080fd5b806306fdde031161043b57806306fdde0314610547578063081812fc14610569578063095ea7b3146105a157806311284a63146105c157806318160ddd146105e557600080fd5b806301ffc9a7146104b057806302452506146104e557806304634d8d14610507578063046dc1661461052757600080fd5b366104ab57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b3480156104bc57600080fd5b506104d06104cb366004614adc565b610f5c565b60405190151581526020015b60405180910390f35b3480156104f157600080fd5b50610505610500366004614af9565b610f8b565b005b34801561051357600080fd5b50610505610522366004614b45565b610f98565b34801561053357600080fd5b50610505610542366004614b78565b610fd9565b34801561055357600080fd5b5061055c61102b565b6040516104dc9190614beb565b34801561057557600080fd5b50610589610584366004614af9565b6110bd565b6040516001600160a01b0390911681526020016104dc565b3480156105ad57600080fd5b506105056105bc366004614bfe565b611101565b3480156105cd57600080fd5b506105d760105481565b6040519081526020016104dc565b3480156105f157600080fd5b506105d7611188565b34801561060657600080fd5b50610505610615366004614c39565b6111a0565b34801561062657600080fd5b506018546105899061010090046001600160a01b031681565b34801561064b57600080fd5b5061065f61065a366004614c66565b611212565b60405160019190910b81526020016104dc565b34801561067e57600080fd5b5061050561068d366004614ca2565b611265565b34801561069e57600080fd5b506105d76106ad366004614c39565b602080526000908152604090205481565b3480156106ca57600080fd5b506106de6106d9366004614cce565b611270565b604080516001600160a01b0390931683526020830191909152016104dc565b34801561070957600080fd5b50610505610718366004614e33565b61131e565b34801561072957600080fd5b506105d7600f5481565b34801561073f57600080fd5b5061050561074e366004614f96565b611367565b34801561075f57600080fd5b50610505611433565b34801561077457600080fd5b506105d7610783366004614fe7565b60215461ffff166000908152601a6020908152604080832060185460ff168452825280832060019490940b8352929052206003015490565b3480156107c757600080fd5b5061050561148c565b3480156107dc57600080fd5b506105056107eb366004614ca2565b6114c0565b3480156107fc57600080fd5b506105d7600e5481565b34801561081257600080fd5b506105056114db565b34801561082757600080fd5b50610505610836366004615002565b6114ed565b34801561084757600080fd5b5060185461085d90600160c01b900461ffff1681565b60405161ffff90911681526020016104dc565b34801561087c57600080fd5b5061050561088b366004615036565b611584565b34801561089c57600080fd5b506108b06108ab366004615072565b6115b9565b6040516104dc9190615102565b3480156108c957600080fd5b50600a54600160a01b900460ff166104d0565b3480156108e857600080fd5b50600c546001600160a01b0316610589565b34801561090657600080fd5b50610589610915366004614af9565b61167f565b34801561092657600080fd5b50610505610935366004614b78565b611691565b34801561094657600080fd5b50600d546105d7565b34801561095b57600080fd5b506105d761096a366004614b78565b6116e3565b34801561097b57600080fd5b50610505611731565b34801561099057600080fd5b5061050561099f36600461516c565b611765565b3480156109b057600080fd5b506105056117b1565b3480156109c557600080fd5b506109d96109d4366004614b78565b6117e3565b6040516104dc9190615187565b3480156109f257600080fd5b506105d760115481565b348015610a0857600080fd5b50610505610a17366004614b78565b61193b565b348015610a2857600080fd5b50610505610a373660046151bf565b611a66565b348015610a4857600080fd5b50601854610a569060ff1681565b60405160ff90911681526020016104dc565b348015610a7457600080fd5b50610505610a83366004614af9565b611aad565b348015610a9457600080fd5b50600a546001600160a01b0316610589565b348015610ab257600080fd5b5061055c611aeb565b348015610ac757600080fd5b506109d9610ad636600461521f565b611afa565b348015610ae757600080fd5b50610505610af63660046153cd565b611cc2565b348015610b0757600080fd5b50610b1b610b163660046154df565b611d50565b6040516104dc959493929190615519565b348015610b3857600080fd5b50610505610b47366004615555565b611e20565b348015610b5857600080fd5b50610505610b6736600461558a565b611f3e565b348015610b7857600080fd5b50610505610b873660046155bf565b612015565b348015610b9857600080fd5b506105d76120ab565b348015610bad57600080fd5b50610505610bbc366004614b78565b6120ba565b348015610bcd57600080fd5b50610505612134565b348015610be257600080fd5b50610beb612168565b6040516104dc91906155eb565b348015610c0457600080fd5b506105d761222f565b348015610c1957600080fd5b506105d7610c28366004615626565b612246565b348015610c3957600080fd5b50610a56610c48366004614af9565b612280565b348015610c5957600080fd5b506105056122b4565b348015610c6e57600080fd5b50610505610c7d36600461516c565b6123f1565b348015610c8e57600080fd5b50610505610c9d366004615650565b61243d565b348015610cae57600080fd5b50610505610cbd3660046156b7565b612487565b348015610cce57600080fd5b5061085d610cdd3660046156f7565b601b60209081526000928352604080842090915290825290205461ffff1681565b348015610d0a57600080fd5b50610d1e610d19366004614c39565b6125eb565b6040516104dc9190615721565b348015610d3757600080fd5b50610505610d4636600461575c565b6126f2565b348015610d5757600080fd5b50610d6b610d66366004614af9565b61278d565b6040516104dc919061577a565b348015610d8457600080fd5b5061055c610d93366004614af9565b61284d565b610505610da63660046157af565b612915565b348015610db757600080fd5b50610505610dc63660046151bf565b612fff565b348015610dd757600080fd5b506105d7610de63660046156f7565b601e60209081526000928352604080842090915290825290205481565b348015610e0f57600080fd5b506105d7610e1e366004615626565b61303f565b348015610e2f57600080fd5b506105056133a5565b348015610e4457600080fd5b50610505610e53366004615807565b6133e4565b348015610e6457600080fd5b5060185461085d90600160b01b900461ffff1681565b348015610e8657600080fd5b506104d0610e9536600461588b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610ecf57600080fd5b50610505610ede366004614b78565b6136f6565b348015610eef57600080fd5b506105d7610efe3660046158b5565b601f60209081526000928352604080842090915290825290205481565b348015610f2757600080fd5b506018546104d090600160a81b900460ff1681565b348015610f4857600080fd5b50610505610f573660046158d1565b61378e565b6000610f6782613ad5565b80610f765750610f7682613af6565b80610f855750610f8582613ad5565b92915050565b610f93613b46565b600d55565b600a546001600160a01b03163314610fcb5760405162461bcd60e51b8152600401610fc2906158ed565b60405180910390fd5b610fd58282613bb7565b5050565b600a546001600160a01b031633146110035760405162461bcd60e51b8152600401610fc2906158ed565b601380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60606002805461103a90615922565b80601f016020809104026020016040519081016040528092919081815260200182805461106690615922565b80156110b35780601f10611088576101008083540402835291602001916110b3565b820191906000526020600020905b81548152906001019060200180831161109657829003601f168201915b5050505050905090565b60006110c882613c71565b6110e5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061110c8261167f565b9050806001600160a01b0316836001600160a01b031614156111415760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146111785761115b8133610e95565b611178576040516367d9dca160e11b815260040160405180910390fd5b611183838383613cb1565b505050565b600061119360115490565b6001546000540303905090565b600a546001600160a01b031633146111ca5760405162461bcd60e51b8152600401610fc2906158ed565b6018805460ff191660ff83169081179091556040519081527f5d14047d25a400b6364f7b505872a4f0e8437d0dfd6cbdd5eee59f37baee7f459060200160405180910390a150565b601c602052826000526040600020602052816000526040600020818154811061123a57600080fd5b906000526020600020906010918282040191900660020292509250509054906101000a900460010b81565b611183838383613d0d565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112e55750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611304906001600160601b031687615973565b61130e91906159a8565b91519350909150505b9250929050565b60005b8281101561135f5761134d8686868685818110611340576113406159bc565b905060200201358561243d565b80611357816159d2565b915050611321565b505050505050565b600a546001600160a01b031633146113915760405162461bcd60e51b8152600401610fc2906158ed565b80156113cf5760218054640100000000900461ffff169060046113b3836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60005b8251811015611183576114218382815181106113f0576113f06159bc565b60200260200101516000015184838151811061140e5761140e6159bc565b60200260200101516020015160006126f2565b8061142b816159d2565b9150506113d2565b600a546001600160a01b0316331461145d5760405162461bcd60e51b8152600401610fc2906158ed565b6040514790339082156108fc029083906000818181858888f19350505050158015610fd5573d6000803e3d6000fd5b600a546001600160a01b031633146114b65760405162461bcd60e51b8152600401610fc2906158ed565b6114be613ef8565b565b6111838383836040518060200160405280600081525061243d565b6114e3613b46565b6114be6000613f9e565b600a546001600160a01b031633146115175760405162461bcd60e51b8152600401610fc2906158ed565b601854600160a81b900460ff16156115715760405162461bcd60e51b815260206004820181905260248201527f4d657461646174612068617320616c7265616479206265656e2066726f7a656e6044820152606401610fc2565b8051610fd5906012906020840190614a0c565b600a546001600160a01b031633146115ae5760405162461bcd60e51b8152600401610fc2906158ed565b611183838383613ff0565b80516060906000816001600160401b038111156115d8576115d8614d34565b60405190808252806020026020018201604052801561162357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816115f65790505b50905060005b82811461167757611652858281518110611645576116456159bc565b602002602001015161278d565b828281518110611664576116646159bc565b6020908102919091010152600101611629565b509392505050565b600061168a826140bb565b5192915050565b600a546001600160a01b031633146116bb5760405162461bcd60e51b8152600401610fc2906158ed565b601880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160a01b03821661170c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600a546001600160a01b0316331461175b5760405162461bcd60e51b8152600401610fc2906158ed565b6114be60006141e4565b600a546001600160a01b0316331461178f5760405162461bcd60e51b8152600401610fc2906158ed565b6018805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b600a546001600160a01b031633146117db5760405162461bcd60e51b8152600401610fc2906158ed565b6114be614236565b606060008060006117f3856116e3565b90506000816001600160401b0381111561180f5761180f614d34565b604051908082528060200260200182016040528015611838578160200160208202803683370190505b50905061185e604080516060810182526000808252602082018190529181019190915290565b600061186960115490565b90505b83861461192f57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925292506118d257611927565b81516001600160a01b0316156118e757815194505b876001600160a01b0316856001600160a01b03161415611927578083878060010198508151811061191a5761191a6159bc565b6020026020010181815250505b60010161186c565b50909695505050505050565b600a546001600160a01b031633146119655760405162461bcd60e51b8152600401610fc2906158ed565b6040516370a0823160e01b815230600482015281906001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b1580156119b057600080fd5b505afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e89190615a0f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190615a28565b60005b81811015611aa657611a948585858585818110611a8857611a886159bc565b90506020020135611265565b80611a9e816159d2565b915050611a69565b5050505050565b600a546001600160a01b03163314611ad75760405162461bcd60e51b8152600401610fc2906158ed565b600090815260096020526040812055565b50565b60606003805461103a90615922565b6060818310611b1c57604051631960ccad60e11b815260040160405180910390fd5b60008054601154851015611b305760115494505b80841115611b3c578093505b6000611b47876116e3565b905084861015611b665785850381811015611b60578091505b50611b6a565b5060005b6000816001600160401b03811115611b8457611b84614d34565b604051908082528060200260200182016040528015611bad578160200160208202803683370190505b50905081611bc0579350611cbb92505050565b6000611bcb8861278d565b905060008160400151611bdc575080515b885b888114158015611bee5750848714155b15611caf57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611c5257611ca7565b82516001600160a01b031615611c6757825191505b8a6001600160a01b0316826001600160a01b03161415611ca75780848880600101995081518110611c9a57611c9a6159bc565b6020026020010181815250505b600101611bde565b50505092835250909150505b9392505050565b600a546001600160a01b03163314611cec5760405162461bcd60e51b8152600401610fc2906158ed565b611cf58a611691565b611cfe89610fd9565b611d07886114ed565b611d118787610f98565b611d1a856123f1565b611d2384611765565b611d2e836001611e20565b611d39826001611f3e565b611d44816001611367565b50505050505050505050565b601a602090815260009384526040808520825292845282842090528252902080548190611d7c90615922565b80601f0160208091040260200160405190810160405280929190818152602001828054611da890615922565b8015611df55780601f10611dca57610100808354040283529160200191611df5565b820191906000526020600020905b815481529060010190602001808311611dd857829003601f168201915b5050506001808501546002860154600387015460049097015495969190920b94919350915060ff1685565b600a546001600160a01b03163314611e4a5760405162461bcd60e51b8152600401610fc2906158ed565b8015611e80576021805461ffff16906000611e64836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60005b825181101561118357611f2c838281518110611ea157611ea16159bc565b602002602001015160000151848381518110611ebf57611ebf6159bc565b602002602001015160200151858481518110611edd57611edd6159bc565b602002602001015160400151868581518110611efb57611efb6159bc565b602002602001015160600151878681518110611f1957611f196159bc565b60200260200101516080015160006133e4565b80611f36816159d2565b915050611e83565b600a546001600160a01b03163314611f685760405162461bcd60e51b8152600401610fc2906158ed565b8015611fb1576021805462010000900461ffff16906002611f88836159ed565b91906101000a81548161ffff021916908361ffff16021790555050601d6000611fb19190614a90565b60005b825181101561118357612003838281518110611fd257611fd26159bc565b602002602001015160000151848381518110611ff057611ff06159bc565b6020026020010151602001516000612487565b8061200d816159d2565b915050611fb4565b6001600160a01b03821633141561203f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006120b56142be565b905090565b6120c2613b46565b6001600160a01b03811661212b5760405162461bcd60e51b815260206004820152602a60248201527f41706574696d69736d3a206e6577206164647265737320697320746865207a65604482015269726f206164647265737360b01b6064820152608401610fc2565b611ae881613f9e565b600a546001600160a01b0316331461215e5760405162461bcd60e51b8152600401610fc2906158ed565b6114be6000600855565b601d546060906000816001600160401b0381111561218857612188614d34565b6040519080825280602002602001820160405280156121b1578160200160208202803683370190505b50905060005b8281101561222857601d81815481106121d2576121d26159bc565b90600052602060002090602091828204019190069054906101000a900460ff16828281518110612204576122046159bc565b60ff9092166020928302919091019091015280612220816159d2565b9150506121b7565b5092915050565b60006122396120ab565b600f546120b59190615a45565b600080612253848461303f565b601854909150600160b01b900461ffff16811115611cbb575050601854600160b01b900461ffff16610f85565b601d818154811061229057600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b600a546001600160a01b031633146122de5760405162461bcd60e51b8152600401610fc2906158ed565b60185461010090046001600160a01b03166123315760405162461bcd60e51b81526020600482015260136024820152721519585b481dd85b1b195d081b9bdd081cd95d606a1b6044820152606401610fc2565b60135460ff16156123755760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610fc2565b61237d6142d2565b516123bc5760405162461bcd60e51b815260206004820152600f60248201526e18985cd9555492481b9bdd081cd95d608a1b6044820152606401610fc2565b601054156123e2576018546010546123e29161010090046001600160a01b0316906142e1565b6013805460ff19166001179055565b600a546001600160a01b0316331461241b5760405162461bcd60e51b8152600401610fc2906158ed565b6018805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b612448848484613d0d565b6001600160a01b0383163b1561248157612464848484846142fb565b612481576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600a546001600160a01b031633146124b15760405162461bcd60e51b8152600401610fc2906158ed565b80156124fa576021805462010000900461ffff169060026124d1836159ed565b91906101000a81548161ffff021916908361ffff16021790555050601d60006124fa9190614a90565b60215462010000900461ffff166000908152601e6020908152604080832060ff871684529091528120839055805b601d5460ff8216101561258c578460ff16601d8260ff168154811061254f5761254f6159bc565b60009182526020918290209181049091015460ff601f9092166101000a900416141561257a57600191505b8061258481615a5c565b915050612528565b508061248157601d8054600181018255600091909152602081047f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f01805460ff808816601f9094166101000a9384029302191691909117905550505050565b60215461ffff166000908152601c6020908152604080832060ff85168452909152812054606091816001600160401b0381111561262a5761262a614d34565b604051908082528060200260200182016040528015612653578160200160208202803683370190505b50905060005b828110156116775760215461ffff166000908152601c6020908152604080832060ff891684529091529020805482908110612696576126966159bc565b90600052602060002090601091828204019190066002029054906101000a900460010b8282815181106126cb576126cb6159bc565b602002602001019060010b908160010b8152505080806126ea906159d2565b915050612659565b600a546001600160a01b0316331461271c5760405162461bcd60e51b8152600401610fc2906158ed565b801561275a5760218054640100000000900461ffff1690600461273e836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b50602154640100000000900461ffff166000908152601f6020908152604080832060019590950b83529390529190912055565b604080516060810182526000808252602082018190529181019190915260408051606081018252600080825260208201819052918101919091526011548310806127d957506000548310155b156127e45792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252906128445792915050565b611cbb836140bb565b606061285882613c71565b6128bc5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610fc2565b6128c46142d2565b516128de5760405180602001604052806000815250610f85565b6128e66142d2565b6128ef836143f3565b604051602001612900929190615a7c565b60405160208183030381529060405292915050565b600a54600160a01b900460ff16156129625760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fc2565b6002600b5414156129b55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610fc2565b6002600b5560185460ff166129fa5760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b6044820152606401610fc2565b836000600187900b12612a1c57612a1961ffff8716601087901b615abb565b90505b60008181526017602052604090205460ff1615612a6e5760405162461bcd60e51b815260206004820152601060248201526f4475706c696361746564206e6f6e636560801b6044820152606401610fc2565b60135461010090046001600160a01b0316612a8b828686866144f0565b6001600160a01b031614612ad55760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610fc2565b60215461ffff166000908152601a6020908152604080832060185460ff90811685529083528184208480529092528220600401541690600188900b8113612b195750865b60215461ffff166000908152601a6020908152604080832060185460ff9081168552908352818420600186900b85529092529091206004015416612b975781612b935760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420656c696769626c6560a01b6044820152606401610fc2565b5060005b60135460ff16612be95760405162461bcd60e51b815260206004820152601460248201527f4e6f7420726561647920666f72207075626c69630000000000000000000000006044820152606401610fc2565b60008911612c395760405162461bcd60e51b815260206004820152601760248201527f5175616e746974792063616e6e6f74206265207a65726f0000000000000000006044820152606401610fc2565b600f5489612c456120ab565b612c4f9190615abb565b1115612ca95760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f74206d696e74206d6f7265207468616e206d6178696d756d20737560448201526370706c7960e01b6064820152608401610fc2565b60008860010b12612d125788612cbf338a612246565b1015612d0d5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610fc2565b612d6c565b88612d1e336000612246565b1015612d6c5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610fc2565b88612d7561222f565b1015612dc35760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e4654206c65667420746f206d696e742e000000006044820152606401610fc2565b60215461ffff166000908152601a6020908152604080832060185460ff1684528252808320600185900b8452909152812060030154612e02908b615973565b6000858152601760205260409020805460ff191660011790559050348114612e6c5760405162461bcd60e51b815260206004820152601760248201527f556e6d6174636865642065746865722062616c616e63650000000000000000006044820152606401610fc2565b612e76338b6142e1565b60185460ff166000908152602080526040902054612e95908b90615abb565b60185460ff1660009081526020808052604080832093909355338252601490522054612ec2908b90615abb565b336000908152601460209081526040808320939093556015815282822060185460ff16835290522054612ef6908b90615abb565b33600090815260156020908152604080832060185460ff16845290915281209190915560018a900b12612f6d5733600090815260166020908152604080832060018d900b8452909152902054612f4d908b90615abb565b33600090815260166020908152604080832060018e900b84529091529020555b6000612710612f7b600d5490565b612f859034615973565b612f8f91906159a8565b9050612fa3600c546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015612fdb573d6000803e3d6000fd5b5080600e54612fea9190615abb565b600e5550506001600b55505050505050505050565b60005b81811015611aa65761302d8585858585818110613021576130216159bc565b905060200201356114c0565b80613037816159d2565b915050613002565b6001600160a01b038216600090815260146020526040812054601854829060ff1661306f57600092505050610f85565b60215462010000900461ffff166000908152601e6020908152604080832060185460ff16845282528083205491805290912054106130b257600092505050610f85565b602154640100000000900461ffff166000908152601f60209081526040808320600188900b808552908352818420546001600160a01b038a168552601684528285209185529252909120541061310d57600092505050610f85565b60215461ffff166000908152601a6020908152604080832060185460ff9081168552908352818420600189900b8552909252909120600401541615613183575060215461ffff166000908152601a6020908152604080832060185460ff1684528252808320600187900b84529091529020600201545b601854600160c01b900461ffff1682106131a257600092505050610f85565b6001600160a01b038516600090815260156020908152604080832060185460ff16845290915290205481116131dc57600092505050610f85565b60215462010000900461ffff166000908152601e6020908152604080832060185460ff168452825280832054918052909120541061321f57600092505050610f85565b602154640100000000900461ffff166000908152601f60209081526040808320600188900b808552908352818420546001600160a01b038a168552601684528285209185529252909120541061327a57600092505050610f85565b601854600090613296908490600160c01b900461ffff16615a45565b6001600160a01b038716600090815260156020908152604080832060185460ff168452909152812054919250906132cd9084615a45565b60185460ff166000818152602080805260408083205460215462010000900461ffff168452601e835281842094845293909152812054929350916133119190615a45565b6001600160a01b038916600090815260166020908152604080832060018c900b80855290835281842054602154640100000000900461ffff168552601f84528285209185529252822054929350909161336a9190615a45565b905061339861337761222f565b61339361338d61338788886145db565b866145db565b846145db565b6145db565b9998505050505050505050565b600a546001600160a01b031633146133cf5760405162461bcd60e51b8152600401610fc2906158ed565b6018805460ff60a81b1916600160a81b179055565b600a546001600160a01b0316331461340e5760405162461bcd60e51b8152600401610fc2906158ed565b8015613444576021805461ffff16906000613428836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60215461ffff166000908152601a6020908152604080832060ff8a8116855290835281842060018a900b8552835292206004810154875193169261348a92880190614a0c565b5085601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b815260200190815260200160002060010160006101000a81548161ffff021916908360010b61ffff16021790555083601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b81526020019081526020016000206002018190555082601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b8152602001908152602001600020600301819055506001601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b815260200190815260200160002060040160006101000a81548160ff0219169083151502179055508015613648575061135f565b60215461ffff9081166000908152601b6020908152604080832060ff8c16845290915281208054909216919061367d836159ed565b825461ffff91821661010093840a908102908302199091161790925560215482166000908152601c6020908152604080832060ff8e1684528252822080546001810182559083529120601082040180548b85166002600f9094169390930290930a91820291909302199091161790555050505050505050565b600a546001600160a01b031633146137205760405162461bcd60e51b8152600401610fc2906158ed565b6001600160a01b0381166137855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fc2565b611ae8816141e4565b600a546001600160a01b031633146137b85760405162461bcd60e51b8152600401610fc2906158ed565b60215461ffff166000908152601a6020908152604080832060ff8087168552908352818420600186900b8552909252909120600401541661382e5760405162461bcd60e51b815260206004820152601060248201526f149bdb19481b9bdd08195e1a5cdd195960821b6044820152606401610fc2565b604080516020808201808452600080845260215461ffff168152601a835284812060ff881682528352848120600187900b825290925292902090516138739290614a0c565b506021805461ffff9081166000908152601a6020818152604080842060ff8916808652908352818520600189810b80885291855283872001805461ffff1916905587548716865284845282862082875284528286208187528452828620600201869055875487168652848452828620828752845282862081875284528286206003018690558754871686529383528185208186528352818520938552928252808420600401805460ff19169055945484168352601b81528483209183525291822080549091169161394383615ad3565b91906101000a81548161ffff021916908361ffff1602179055505060005b60215461ffff166000908152601c6020908152604080832060ff80881685529252909120549082161015613a395760215461ffff166000908152601c6020908152604080832060ff808816855292529091208054600185900b9284169081106139cc576139cc6159bc565b60009182526020909120601082040154600f9091166002026101000a900460010b1415613a275760215461ffff166000908152601c6020908152604080832060ff80881685529252909120613a229183166145f1565b613a39565b80613a3181615a5c565b915050613961565b5060215461ffff9081166000908152601b6020908152604080832060ff8716845290915290205416610fd55760005b601d5460ff82161015611183578260ff16601d8260ff1681548110613a8f57613a8f6159bc565b60009182526020918290209181049091015460ff601f9092166101000a9004161415613ac357611183601d8260ff16614725565b80613acd81615a5c565b915050613a68565b60006001600160e01b0319821663152a902d60e11b1480610f855750610f85825b60006001600160e01b031982166380ac58cd60e01b1480613b2757506001600160e01b03198216635b5e139f60e01b145b80610f8557506301ffc9a760e01b6001600160e01b0319831614610f85565b600c546001600160a01b031633146114be5760405162461bcd60e51b815260206004820152602e60248201527f41706574696d69736d3a2063616c6c6572206973206e6f74207468652061706560448201526d74696d69736d206164647265737360901b6064820152608401610fc2565b6127106001600160601b0382161115613be25760405162461bcd60e51b8152600401610fc290615af1565b6001600160a01b038216613c385760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610fc2565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b600081613c7d60115490565b11158015613c8c575060005482105b8015610f85575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613d18826140bb565b9050836001600160a01b031681600001516001600160a01b031614613d4f5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480613d6d5750613d6d8533610e95565b80613d88575033613d7d846110bd565b6001600160a01b0316145b905080613da857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416613dcf57604051633a954ecd60e21b815260040160405180910390fd5b613ddb60008487613cb1565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613eaf576000548214613eaf57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611aa6565b600a54600160a01b900460ff16613f515760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610fc2565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b6127106001600160601b038216111561401b5760405162461bcd60e51b8152600401610fc290615af1565b6001600160a01b0382166140715760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610fc2565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b604080516060810182526000808252602082018190529181019190915281806140e360115490565b116141cb576000548110156141cb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906141c95780516001600160a01b031615614160579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156141c4579392505050565b614160565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff16156142835760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fc2565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613f813390565b60006142c960115490565b60005403905090565b60606012805461103a90615922565b610fd5828260405180602001604052806000815250614848565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290614330903390899088908890600401615b3b565b602060405180830381600087803b15801561434a57600080fd5b505af192505050801561437a575060408051601f3d908101601f1916820190925261437791810190615b77565b60015b6143d5573d8080156143a8576040519150601f19603f3d011682016040523d82523d6000602084013e6143ad565b606091505b5080516143cd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816144175750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614441578061442b816159d2565b915061443a9050600a836159a8565b915061441b565b6000816001600160401b0381111561445b5761445b614d34565b6040519080825280601f01601f191660200182016040528015614485576020820181803683370190505b5090505b84156143eb5761449a600183615a45565b91506144a7600a86615b94565b6144b2906030615abb565b60f81b8183815181106144c7576144c76159bc565b60200101906001600160f81b031916908160001a9053506144e9600a866159a8565b9450614489565b6000808560405160200161450691815260200190565b60405160208183030381529060405280519060200120905060008160405160200161455d91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915060019060a0016020604051602081039080840390855afa1580156145c5573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b60008183106145ea5781611cbb565b5090919050565b805b825461460190600190615a45565b81101561469e5782614614826001615abb565b81548110614624576146246159bc565b90600052602060002090601091828204019190066002029054906101000a900460010b838281548110614659576146596159bc565b90600052602060002090601091828204019190066002026101000a81548161ffff021916908360010b61ffff1602179055508080614696906159d2565b9150506145f3565b50815482906146af90600190615a45565b815481106146bf576146bf6159bc565b90600052602060002090601091828204019190066002026101000a81549061ffff0219169055818054806146f5576146f5615ba8565b600082815260209020601060001990920191820401805461ffff6002600f8516026101000a021916905590555050565b805b825461473590600190615a45565b8110156147c75782614748826001615abb565b81548110614758576147586159bc565b90600052602060002090602091828204019190069054906101000a900460ff1683828154811061478a5761478a6159bc565b90600052602060002090602091828204019190066101000a81548160ff021916908360ff16021790555080806147bf906159d2565b915050614727565b50815482906147d890600190615a45565b815481106147e8576147e86159bc565b90600052602060002090602091828204019190066101000a81549060ff02191690558180548061481a5761481a615ba8565b60019003818190600052602060002090602091828204019190066101000a81549060ff021916905590555050565b6000546001600160a01b03841661487157604051622e076360e81b815260040160405180910390fd5b8261488f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b156149b7575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461498060008784806001019550876142fb565b61499d576040516368d2bf6b60e11b815260040160405180910390fd5b8082106149355782600054146149b257600080fd5b6149fc565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106149b8575b5060009081556124819085838684565b828054614a1890615922565b90600052602060002090601f016020900481019282614a3a5760008555614a80565b82601f10614a5357805160ff1916838001178555614a80565b82800160010185558215614a80579182015b82811115614a80578251825591602001919060010190614a65565b50614a8c929150614ab1565b5090565b50805460008255601f016020900490600052602060002090810190611ae891905b5b80821115614a8c5760008155600101614ab2565b6001600160e01b031981168114611ae857600080fd5b600060208284031215614aee57600080fd5b8135611cbb81614ac6565b600060208284031215614b0b57600080fd5b5035919050565b80356001600160a01b0381168114614b2957600080fd5b919050565b80356001600160601b0381168114614b2957600080fd5b60008060408385031215614b5857600080fd5b614b6183614b12565b9150614b6f60208401614b2e565b90509250929050565b600060208284031215614b8a57600080fd5b611cbb82614b12565b60005b83811015614bae578181015183820152602001614b96565b838111156124815750506000910152565b60008151808452614bd7816020860160208601614b93565b601f01601f19169290920160200192915050565b602081526000611cbb6020830184614bbf565b60008060408385031215614c1157600080fd5b614c1a83614b12565b946020939093013593505050565b803560ff81168114614b2957600080fd5b600060208284031215614c4b57600080fd5b611cbb82614c28565b803561ffff81168114614b2957600080fd5b600080600060608486031215614c7b57600080fd5b614c8484614c54565b9250614c9260208501614c28565b9150604084013590509250925092565b600080600060608486031215614cb757600080fd5b614cc084614b12565b9250614c9260208501614b12565b60008060408385031215614ce157600080fd5b50508035926020909101359150565b60008083601f840112614d0257600080fd5b5081356001600160401b03811115614d1957600080fd5b6020830191508360208260051b850101111561131757600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715614d6c57614d6c614d34565b60405290565b60405160a081016001600160401b0381118282101715614d6c57614d6c614d34565b604051601f8201601f191681016001600160401b0381118282101715614dbc57614dbc614d34565b604052919050565b600082601f830112614dd557600080fd5b81356001600160401b03811115614dee57614dee614d34565b614e01601f8201601f1916602001614d94565b818152846020838601011115614e1657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060808688031215614e4b57600080fd5b614e5486614b12565b9450614e6260208701614b12565b935060408601356001600160401b0380821115614e7e57600080fd5b614e8a89838a01614cf0565b90955093506060880135915080821115614ea357600080fd5b50614eb088828901614dc4565b9150509295509295909350565b60006001600160401b03821115614ed657614ed6614d34565b5060051b60200190565b8035600181900b8114614b2957600080fd5b600082601f830112614f0357600080fd5b81356020614f18614f1383614ebd565b614d94565b82815260069290921b84018101918181019086841115614f3757600080fd5b8286015b84811015614f7d5760408189031215614f545760008081fd5b614f5c614d4a565b614f6582614ee0565b81528185013585820152835291830191604001614f3b565b509695505050505050565b8015158114611ae857600080fd5b60008060408385031215614fa957600080fd5b82356001600160401b03811115614fbf57600080fd5b614fcb85828601614ef2565b9250506020830135614fdc81614f88565b809150509250929050565b600060208284031215614ff957600080fd5b611cbb82614ee0565b60006020828403121561501457600080fd5b81356001600160401b0381111561502a57600080fd5b6143eb84828501614dc4565b60008060006060848603121561504b57600080fd5b8335925061505b60208501614b12565b915061506960408501614b2e565b90509250925092565b6000602080838503121561508557600080fd5b82356001600160401b0381111561509b57600080fd5b8301601f810185136150ac57600080fd5b80356150ba614f1382614ebd565b81815260059190911b820183019083810190878311156150d957600080fd5b928401925b828410156150f7578335825292840192908401906150de565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561192f5761515983855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b928401926060929092019160010161511e565b60006020828403121561517e57600080fd5b611cbb82614c54565b6020808252825182820181905260009190848201906040850190845b8181101561192f578351835292840192918401916001016151a3565b600080600080606085870312156151d557600080fd5b6151de85614b12565b93506151ec60208601614b12565b925060408501356001600160401b0381111561520757600080fd5b61521387828801614cf0565b95989497509550505050565b60008060006060848603121561523457600080fd5b61523d84614b12565b95602085013595506040909401359392505050565b600082601f83011261526357600080fd5b81356020615273614f1383614ebd565b82815260059290921b8401810191818101908684111561529257600080fd5b8286015b84811015614f7d5780356001600160401b03808211156152b65760008081fd5b9088019060a0828b03601f19018113156152d05760008081fd5b6152d8614d72565b6152e3888501614c28565b815260406152f2818601614ee0565b898301526060808601358581111561530a5760008081fd5b6153188f8c838a0101614dc4565b928401929092526080868101359184019190915292909401359181019190915285525050918301918301615296565b600082601f83011261535857600080fd5b81356020615368614f1383614ebd565b82815260069290921b8401810191818101908684111561538757600080fd5b8286015b84811015614f7d57604081890312156153a45760008081fd5b6153ac614d4a565b6153b582614c28565b8152818501358582015283529183019160400161538b565b6000806000806000806000806000806101408b8d0312156153ed57600080fd5b6153f68b614b12565b995061540460208c01614b12565b985060408b01356001600160401b038082111561542057600080fd5b61542c8e838f01614dc4565b995061543a60608e01614b12565b985061544860808e01614b2e565b975061545660a08e01614c54565b965061546460c08e01614c54565b955060e08d013591508082111561547a57600080fd5b6154868e838f01615252565b94506101008d013591508082111561549d57600080fd5b6154a98e838f01615347565b93506101208d01359150808211156154c057600080fd5b506154cd8d828e01614ef2565b9150509295989b9194979a5092959850565b6000806000606084860312156154f457600080fd5b6154fd84614c54565b925061550b60208501614c28565b915061506960408501614ee0565b60a08152600061552c60a0830188614bbf565b90508560010b602083015284604083015283606083015282151560808301529695505050505050565b6000806040838503121561556857600080fd5b82356001600160401b0381111561557e57600080fd5b614fcb85828601615252565b6000806040838503121561559d57600080fd5b82356001600160401b038111156155b357600080fd5b614fcb85828601615347565b600080604083850312156155d257600080fd5b6155db83614b12565b91506020830135614fdc81614f88565b6020808252825182820181905260009190848201906040850190845b8181101561192f57835160ff1683529284019291840191600101615607565b6000806040838503121561563957600080fd5b61564283614b12565b9150614b6f60208401614ee0565b6000806000806080858703121561566657600080fd5b61566f85614b12565b935061567d60208601614b12565b92506040850135915060608501356001600160401b0381111561569f57600080fd5b6156ab87828801614dc4565b91505092959194509250565b6000806000606084860312156156cc57600080fd5b6156d584614c28565b92506020840135915060408401356156ec81614f88565b809150509250925092565b6000806040838503121561570a57600080fd5b61571383614c54565b9150614b6f60208401614c28565b6020808252825182820181905260009190848201906040850190845b8181101561192f578351600190810b845293850193928501920161573d565b60008060006060848603121561577157600080fd5b6156d584614ee0565b81516001600160a01b031681526020808301516001600160401b03169082015260408083015115159082015260608101610f85565b60008060008060008060c087890312156157c857600080fd5b863595506157d860208801614ee0565b9450604087013593506157ed60608801614c28565b92506080870135915060a087013590509295509295509295565b60008060008060008060c0878903121561582057600080fd5b61582987614c28565b955061583760208801614ee0565b945060408701356001600160401b0381111561585257600080fd5b61585e89828a01614dc4565b945050606087013592506080870135915060a087013561587d81614f88565b809150509295509295509295565b6000806040838503121561589e57600080fd5b6158a783614b12565b9150614b6f60208401614b12565b600080604083850312156158c857600080fd5b61564283614c54565b600080604083850312156158e457600080fd5b61564283614c28565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061593657607f821691505b6020821081141561595757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561598d5761598d61595d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826159b7576159b7615992565b500490565b634e487b7160e01b600052603260045260246000fd5b60006000198214156159e6576159e661595d565b5060010190565b600061ffff80831681811415615a0557615a0561595d565b6001019392505050565b600060208284031215615a2157600080fd5b5051919050565b600060208284031215615a3a57600080fd5b8151611cbb81614f88565b600082821015615a5757615a5761595d565b500390565b600060ff821660ff811415615a7357615a7361595d565b60010192915050565b60008351615a8e818460208801614b93565b835190830190615aa2818360208801614b93565b64173539b7b760d91b9101908152600501949350505050565b60008219821115615ace57615ace61595d565b500190565b600061ffff821680615ae757615ae761595d565b6000190192915050565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615b6d6080830184614bbf565b9695505050505050565b600060208284031215615b8957600080fd5b8151611cbb81614ac6565b600082615ba357615ba3615992565b500690565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220af9af34ebc1d0c1cc6f5208e7dca8c1b4ad7bbe45a66ebdb65c866680a96fe1464736f6c63430008090033000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f
Deployed Bytecode
0x60806040526004361061046c5760003560e01c8063894760691161024a578063b6a7412111610139578063d047d038116100b6578063e985e9c51161007a578063e985e9c514610e7a578063f2fde38b14610ec3578063f5a4156c14610ee3578063fb3cc6c214610f1b578063fe2e66f414610f3c57600080fd5b8063d047d03814610dcb578063d0950e7414610e03578063d111515d14610e23578063d324f37214610e38578063de7fcb1d14610e5857600080fd5b8063bf65eb34116100fd578063bf65eb3414610d2b578063c23dc68f14610d4b578063c87b56dd14610d78578063cb0010fa14610d98578063cf502d0d14610dab57600080fd5b8063b6a7412114610c62578063b88d4fde14610c82578063ba1402d314610ca2578063bd8fc4a214610cc2578063be56844814610cfe57600080fd5b8063a13429a9116101c7578063aab16cfc1161018b578063aab16cfc14610bd6578063ac7dc68d14610bf8578063b1ad048c14610c0d578063b1e8dbaa14610c2d578063b649270614610c4d57600080fd5b8063a13429a914610b4c578063a22cb46514610b6c578063a2309ff814610b8c578063a77a8c8514610ba1578063aa1b103f14610bc157600080fd5b806395d89b411161020e57806395d89b4114610aa657806399a2557a14610abb5780639cb18d3714610adb5780639e8cc8d314610afb578063a05714ce14610b2c57600080fd5b806389476069146109fc57806389b5a8c214610a1c5780638a19c8bc14610a3c5780638a616bc014610a685780638da5cb5b14610a8857600080fd5b80633e8f18f0116103665780636324559b116102e3578063715018a6116102a7578063715018a61461096f57806379a2c3f8146109845780638456cb59146109a45780638462151c146109b957806387f65c91146109e657600080fd5b80636324559b146108dc5780636352211e146108fa5780636690864e1461091a5780636e56431c1461093a57806370a082311461094f57600080fd5b806355f804b31161032a57806355f804b31461081b578063572849c41461083b5780635944c753146108705780635bbb2177146108905780635c975abb146108bd57600080fd5b80633e8f18f0146107685780633f4ba83a146107bb57806342842e0e146107d057806346830628146107f057806351dc26901461080657600080fd5b8063183ab264116103f45780632a55205a116103b85780632a55205a146106be57806332ab9bbe146106fd57806332cb6b0c1461071d57806333ee7927146107335780633ccfd60b1461075357600080fd5b8063183ab264146105fa5780631c75f0851461061a57806321120f7a1461063f57806323b872dd1461067257806327854c151461069257600080fd5b806306fdde031161043b57806306fdde0314610547578063081812fc14610569578063095ea7b3146105a157806311284a63146105c157806318160ddd146105e557600080fd5b806301ffc9a7146104b057806302452506146104e557806304634d8d14610507578063046dc1661461052757600080fd5b366104ab57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b3480156104bc57600080fd5b506104d06104cb366004614adc565b610f5c565b60405190151581526020015b60405180910390f35b3480156104f157600080fd5b50610505610500366004614af9565b610f8b565b005b34801561051357600080fd5b50610505610522366004614b45565b610f98565b34801561053357600080fd5b50610505610542366004614b78565b610fd9565b34801561055357600080fd5b5061055c61102b565b6040516104dc9190614beb565b34801561057557600080fd5b50610589610584366004614af9565b6110bd565b6040516001600160a01b0390911681526020016104dc565b3480156105ad57600080fd5b506105056105bc366004614bfe565b611101565b3480156105cd57600080fd5b506105d760105481565b6040519081526020016104dc565b3480156105f157600080fd5b506105d7611188565b34801561060657600080fd5b50610505610615366004614c39565b6111a0565b34801561062657600080fd5b506018546105899061010090046001600160a01b031681565b34801561064b57600080fd5b5061065f61065a366004614c66565b611212565b60405160019190910b81526020016104dc565b34801561067e57600080fd5b5061050561068d366004614ca2565b611265565b34801561069e57600080fd5b506105d76106ad366004614c39565b602080526000908152604090205481565b3480156106ca57600080fd5b506106de6106d9366004614cce565b611270565b604080516001600160a01b0390931683526020830191909152016104dc565b34801561070957600080fd5b50610505610718366004614e33565b61131e565b34801561072957600080fd5b506105d7600f5481565b34801561073f57600080fd5b5061050561074e366004614f96565b611367565b34801561075f57600080fd5b50610505611433565b34801561077457600080fd5b506105d7610783366004614fe7565b60215461ffff166000908152601a6020908152604080832060185460ff168452825280832060019490940b8352929052206003015490565b3480156107c757600080fd5b5061050561148c565b3480156107dc57600080fd5b506105056107eb366004614ca2565b6114c0565b3480156107fc57600080fd5b506105d7600e5481565b34801561081257600080fd5b506105056114db565b34801561082757600080fd5b50610505610836366004615002565b6114ed565b34801561084757600080fd5b5060185461085d90600160c01b900461ffff1681565b60405161ffff90911681526020016104dc565b34801561087c57600080fd5b5061050561088b366004615036565b611584565b34801561089c57600080fd5b506108b06108ab366004615072565b6115b9565b6040516104dc9190615102565b3480156108c957600080fd5b50600a54600160a01b900460ff166104d0565b3480156108e857600080fd5b50600c546001600160a01b0316610589565b34801561090657600080fd5b50610589610915366004614af9565b61167f565b34801561092657600080fd5b50610505610935366004614b78565b611691565b34801561094657600080fd5b50600d546105d7565b34801561095b57600080fd5b506105d761096a366004614b78565b6116e3565b34801561097b57600080fd5b50610505611731565b34801561099057600080fd5b5061050561099f36600461516c565b611765565b3480156109b057600080fd5b506105056117b1565b3480156109c557600080fd5b506109d96109d4366004614b78565b6117e3565b6040516104dc9190615187565b3480156109f257600080fd5b506105d760115481565b348015610a0857600080fd5b50610505610a17366004614b78565b61193b565b348015610a2857600080fd5b50610505610a373660046151bf565b611a66565b348015610a4857600080fd5b50601854610a569060ff1681565b60405160ff90911681526020016104dc565b348015610a7457600080fd5b50610505610a83366004614af9565b611aad565b348015610a9457600080fd5b50600a546001600160a01b0316610589565b348015610ab257600080fd5b5061055c611aeb565b348015610ac757600080fd5b506109d9610ad636600461521f565b611afa565b348015610ae757600080fd5b50610505610af63660046153cd565b611cc2565b348015610b0757600080fd5b50610b1b610b163660046154df565b611d50565b6040516104dc959493929190615519565b348015610b3857600080fd5b50610505610b47366004615555565b611e20565b348015610b5857600080fd5b50610505610b6736600461558a565b611f3e565b348015610b7857600080fd5b50610505610b873660046155bf565b612015565b348015610b9857600080fd5b506105d76120ab565b348015610bad57600080fd5b50610505610bbc366004614b78565b6120ba565b348015610bcd57600080fd5b50610505612134565b348015610be257600080fd5b50610beb612168565b6040516104dc91906155eb565b348015610c0457600080fd5b506105d761222f565b348015610c1957600080fd5b506105d7610c28366004615626565b612246565b348015610c3957600080fd5b50610a56610c48366004614af9565b612280565b348015610c5957600080fd5b506105056122b4565b348015610c6e57600080fd5b50610505610c7d36600461516c565b6123f1565b348015610c8e57600080fd5b50610505610c9d366004615650565b61243d565b348015610cae57600080fd5b50610505610cbd3660046156b7565b612487565b348015610cce57600080fd5b5061085d610cdd3660046156f7565b601b60209081526000928352604080842090915290825290205461ffff1681565b348015610d0a57600080fd5b50610d1e610d19366004614c39565b6125eb565b6040516104dc9190615721565b348015610d3757600080fd5b50610505610d4636600461575c565b6126f2565b348015610d5757600080fd5b50610d6b610d66366004614af9565b61278d565b6040516104dc919061577a565b348015610d8457600080fd5b5061055c610d93366004614af9565b61284d565b610505610da63660046157af565b612915565b348015610db757600080fd5b50610505610dc63660046151bf565b612fff565b348015610dd757600080fd5b506105d7610de63660046156f7565b601e60209081526000928352604080842090915290825290205481565b348015610e0f57600080fd5b506105d7610e1e366004615626565b61303f565b348015610e2f57600080fd5b506105056133a5565b348015610e4457600080fd5b50610505610e53366004615807565b6133e4565b348015610e6457600080fd5b5060185461085d90600160b01b900461ffff1681565b348015610e8657600080fd5b506104d0610e9536600461588b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610ecf57600080fd5b50610505610ede366004614b78565b6136f6565b348015610eef57600080fd5b506105d7610efe3660046158b5565b601f60209081526000928352604080842090915290825290205481565b348015610f2757600080fd5b506018546104d090600160a81b900460ff1681565b348015610f4857600080fd5b50610505610f573660046158d1565b61378e565b6000610f6782613ad5565b80610f765750610f7682613af6565b80610f855750610f8582613ad5565b92915050565b610f93613b46565b600d55565b600a546001600160a01b03163314610fcb5760405162461bcd60e51b8152600401610fc2906158ed565b60405180910390fd5b610fd58282613bb7565b5050565b600a546001600160a01b031633146110035760405162461bcd60e51b8152600401610fc2906158ed565b601380546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60606002805461103a90615922565b80601f016020809104026020016040519081016040528092919081815260200182805461106690615922565b80156110b35780601f10611088576101008083540402835291602001916110b3565b820191906000526020600020905b81548152906001019060200180831161109657829003601f168201915b5050505050905090565b60006110c882613c71565b6110e5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061110c8261167f565b9050806001600160a01b0316836001600160a01b031614156111415760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216146111785761115b8133610e95565b611178576040516367d9dca160e11b815260040160405180910390fd5b611183838383613cb1565b505050565b600061119360115490565b6001546000540303905090565b600a546001600160a01b031633146111ca5760405162461bcd60e51b8152600401610fc2906158ed565b6018805460ff191660ff83169081179091556040519081527f5d14047d25a400b6364f7b505872a4f0e8437d0dfd6cbdd5eee59f37baee7f459060200160405180910390a150565b601c602052826000526040600020602052816000526040600020818154811061123a57600080fd5b906000526020600020906010918282040191900660020292509250509054906101000a900460010b81565b611183838383613d0d565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112e55750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611304906001600160601b031687615973565b61130e91906159a8565b91519350909150505b9250929050565b60005b8281101561135f5761134d8686868685818110611340576113406159bc565b905060200201358561243d565b80611357816159d2565b915050611321565b505050505050565b600a546001600160a01b031633146113915760405162461bcd60e51b8152600401610fc2906158ed565b80156113cf5760218054640100000000900461ffff169060046113b3836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60005b8251811015611183576114218382815181106113f0576113f06159bc565b60200260200101516000015184838151811061140e5761140e6159bc565b60200260200101516020015160006126f2565b8061142b816159d2565b9150506113d2565b600a546001600160a01b0316331461145d5760405162461bcd60e51b8152600401610fc2906158ed565b6040514790339082156108fc029083906000818181858888f19350505050158015610fd5573d6000803e3d6000fd5b600a546001600160a01b031633146114b65760405162461bcd60e51b8152600401610fc2906158ed565b6114be613ef8565b565b6111838383836040518060200160405280600081525061243d565b6114e3613b46565b6114be6000613f9e565b600a546001600160a01b031633146115175760405162461bcd60e51b8152600401610fc2906158ed565b601854600160a81b900460ff16156115715760405162461bcd60e51b815260206004820181905260248201527f4d657461646174612068617320616c7265616479206265656e2066726f7a656e6044820152606401610fc2565b8051610fd5906012906020840190614a0c565b600a546001600160a01b031633146115ae5760405162461bcd60e51b8152600401610fc2906158ed565b611183838383613ff0565b80516060906000816001600160401b038111156115d8576115d8614d34565b60405190808252806020026020018201604052801561162357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816115f65790505b50905060005b82811461167757611652858281518110611645576116456159bc565b602002602001015161278d565b828281518110611664576116646159bc565b6020908102919091010152600101611629565b509392505050565b600061168a826140bb565b5192915050565b600a546001600160a01b031633146116bb5760405162461bcd60e51b8152600401610fc2906158ed565b601880546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160a01b03821661170c576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b600a546001600160a01b0316331461175b5760405162461bcd60e51b8152600401610fc2906158ed565b6114be60006141e4565b600a546001600160a01b0316331461178f5760405162461bcd60e51b8152600401610fc2906158ed565b6018805461ffff909216600160c01b0261ffff60c01b19909216919091179055565b600a546001600160a01b031633146117db5760405162461bcd60e51b8152600401610fc2906158ed565b6114be614236565b606060008060006117f3856116e3565b90506000816001600160401b0381111561180f5761180f614d34565b604051908082528060200260200182016040528015611838578160200160208202803683370190505b50905061185e604080516060810182526000808252602082018190529181019190915290565b600061186960115490565b90505b83861461192f57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925292506118d257611927565b81516001600160a01b0316156118e757815194505b876001600160a01b0316856001600160a01b03161415611927578083878060010198508151811061191a5761191a6159bc565b6020026020010181815250505b60010161186c565b50909695505050505050565b600a546001600160a01b031633146119655760405162461bcd60e51b8152600401610fc2906158ed565b6040516370a0823160e01b815230600482015281906001600160a01b0382169063a9059cbb90339083906370a082319060240160206040518083038186803b1580156119b057600080fd5b505afa1580156119c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e89190615a0f565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b158015611a2e57600080fd5b505af1158015611a42573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190615a28565b60005b81811015611aa657611a948585858585818110611a8857611a886159bc565b90506020020135611265565b80611a9e816159d2565b915050611a69565b5050505050565b600a546001600160a01b03163314611ad75760405162461bcd60e51b8152600401610fc2906158ed565b600090815260096020526040812055565b50565b60606003805461103a90615922565b6060818310611b1c57604051631960ccad60e11b815260040160405180910390fd5b60008054601154851015611b305760115494505b80841115611b3c578093505b6000611b47876116e3565b905084861015611b665785850381811015611b60578091505b50611b6a565b5060005b6000816001600160401b03811115611b8457611b84614d34565b604051908082528060200260200182016040528015611bad578160200160208202803683370190505b50905081611bc0579350611cbb92505050565b6000611bcb8861278d565b905060008160400151611bdc575080515b885b888114158015611bee5750848714155b15611caf57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611c5257611ca7565b82516001600160a01b031615611c6757825191505b8a6001600160a01b0316826001600160a01b03161415611ca75780848880600101995081518110611c9a57611c9a6159bc565b6020026020010181815250505b600101611bde565b50505092835250909150505b9392505050565b600a546001600160a01b03163314611cec5760405162461bcd60e51b8152600401610fc2906158ed565b611cf58a611691565b611cfe89610fd9565b611d07886114ed565b611d118787610f98565b611d1a856123f1565b611d2384611765565b611d2e836001611e20565b611d39826001611f3e565b611d44816001611367565b50505050505050505050565b601a602090815260009384526040808520825292845282842090528252902080548190611d7c90615922565b80601f0160208091040260200160405190810160405280929190818152602001828054611da890615922565b8015611df55780601f10611dca57610100808354040283529160200191611df5565b820191906000526020600020905b815481529060010190602001808311611dd857829003601f168201915b5050506001808501546002860154600387015460049097015495969190920b94919350915060ff1685565b600a546001600160a01b03163314611e4a5760405162461bcd60e51b8152600401610fc2906158ed565b8015611e80576021805461ffff16906000611e64836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60005b825181101561118357611f2c838281518110611ea157611ea16159bc565b602002602001015160000151848381518110611ebf57611ebf6159bc565b602002602001015160200151858481518110611edd57611edd6159bc565b602002602001015160400151868581518110611efb57611efb6159bc565b602002602001015160600151878681518110611f1957611f196159bc565b60200260200101516080015160006133e4565b80611f36816159d2565b915050611e83565b600a546001600160a01b03163314611f685760405162461bcd60e51b8152600401610fc2906158ed565b8015611fb1576021805462010000900461ffff16906002611f88836159ed565b91906101000a81548161ffff021916908361ffff16021790555050601d6000611fb19190614a90565b60005b825181101561118357612003838281518110611fd257611fd26159bc565b602002602001015160000151848381518110611ff057611ff06159bc565b6020026020010151602001516000612487565b8061200d816159d2565b915050611fb4565b6001600160a01b03821633141561203f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006120b56142be565b905090565b6120c2613b46565b6001600160a01b03811661212b5760405162461bcd60e51b815260206004820152602a60248201527f41706574696d69736d3a206e6577206164647265737320697320746865207a65604482015269726f206164647265737360b01b6064820152608401610fc2565b611ae881613f9e565b600a546001600160a01b0316331461215e5760405162461bcd60e51b8152600401610fc2906158ed565b6114be6000600855565b601d546060906000816001600160401b0381111561218857612188614d34565b6040519080825280602002602001820160405280156121b1578160200160208202803683370190505b50905060005b8281101561222857601d81815481106121d2576121d26159bc565b90600052602060002090602091828204019190069054906101000a900460ff16828281518110612204576122046159bc565b60ff9092166020928302919091019091015280612220816159d2565b9150506121b7565b5092915050565b60006122396120ab565b600f546120b59190615a45565b600080612253848461303f565b601854909150600160b01b900461ffff16811115611cbb575050601854600160b01b900461ffff16610f85565b601d818154811061229057600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b600a546001600160a01b031633146122de5760405162461bcd60e51b8152600401610fc2906158ed565b60185461010090046001600160a01b03166123315760405162461bcd60e51b81526020600482015260136024820152721519585b481dd85b1b195d081b9bdd081cd95d606a1b6044820152606401610fc2565b60135460ff16156123755760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610fc2565b61237d6142d2565b516123bc5760405162461bcd60e51b815260206004820152600f60248201526e18985cd9555492481b9bdd081cd95d608a1b6044820152606401610fc2565b601054156123e2576018546010546123e29161010090046001600160a01b0316906142e1565b6013805460ff19166001179055565b600a546001600160a01b0316331461241b5760405162461bcd60e51b8152600401610fc2906158ed565b6018805461ffff909216600160b01b0261ffff60b01b19909216919091179055565b612448848484613d0d565b6001600160a01b0383163b1561248157612464848484846142fb565b612481576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600a546001600160a01b031633146124b15760405162461bcd60e51b8152600401610fc2906158ed565b80156124fa576021805462010000900461ffff169060026124d1836159ed565b91906101000a81548161ffff021916908361ffff16021790555050601d60006124fa9190614a90565b60215462010000900461ffff166000908152601e6020908152604080832060ff871684529091528120839055805b601d5460ff8216101561258c578460ff16601d8260ff168154811061254f5761254f6159bc565b60009182526020918290209181049091015460ff601f9092166101000a900416141561257a57600191505b8061258481615a5c565b915050612528565b508061248157601d8054600181018255600091909152602081047f6d4407e7be21f808e6509aa9fa9143369579dd7d760fe20a2c09680fc146134f01805460ff808816601f9094166101000a9384029302191691909117905550505050565b60215461ffff166000908152601c6020908152604080832060ff85168452909152812054606091816001600160401b0381111561262a5761262a614d34565b604051908082528060200260200182016040528015612653578160200160208202803683370190505b50905060005b828110156116775760215461ffff166000908152601c6020908152604080832060ff891684529091529020805482908110612696576126966159bc565b90600052602060002090601091828204019190066002029054906101000a900460010b8282815181106126cb576126cb6159bc565b602002602001019060010b908160010b8152505080806126ea906159d2565b915050612659565b600a546001600160a01b0316331461271c5760405162461bcd60e51b8152600401610fc2906158ed565b801561275a5760218054640100000000900461ffff1690600461273e836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b50602154640100000000900461ffff166000908152601f6020908152604080832060019590950b83529390529190912055565b604080516060810182526000808252602082018190529181019190915260408051606081018252600080825260208201819052918101919091526011548310806127d957506000548310155b156127e45792915050565b50600082815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252906128445792915050565b611cbb836140bb565b606061285882613c71565b6128bc5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610fc2565b6128c46142d2565b516128de5760405180602001604052806000815250610f85565b6128e66142d2565b6128ef836143f3565b604051602001612900929190615a7c565b60405160208183030381529060405292915050565b600a54600160a01b900460ff16156129625760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fc2565b6002600b5414156129b55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610fc2565b6002600b5560185460ff166129fa5760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b6044820152606401610fc2565b836000600187900b12612a1c57612a1961ffff8716601087901b615abb565b90505b60008181526017602052604090205460ff1615612a6e5760405162461bcd60e51b815260206004820152601060248201526f4475706c696361746564206e6f6e636560801b6044820152606401610fc2565b60135461010090046001600160a01b0316612a8b828686866144f0565b6001600160a01b031614612ad55760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610fc2565b60215461ffff166000908152601a6020908152604080832060185460ff90811685529083528184208480529092528220600401541690600188900b8113612b195750865b60215461ffff166000908152601a6020908152604080832060185460ff9081168552908352818420600186900b85529092529091206004015416612b975781612b935760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420656c696769626c6560a01b6044820152606401610fc2565b5060005b60135460ff16612be95760405162461bcd60e51b815260206004820152601460248201527f4e6f7420726561647920666f72207075626c69630000000000000000000000006044820152606401610fc2565b60008911612c395760405162461bcd60e51b815260206004820152601760248201527f5175616e746974792063616e6e6f74206265207a65726f0000000000000000006044820152606401610fc2565b600f5489612c456120ab565b612c4f9190615abb565b1115612ca95760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f74206d696e74206d6f7265207468616e206d6178696d756d20737560448201526370706c7960e01b6064820152608401610fc2565b60008860010b12612d125788612cbf338a612246565b1015612d0d5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610fc2565b612d6c565b88612d1e336000612246565b1015612d6c5760405162461bcd60e51b815260206004820181905260248201527f596f7520686176652072656163686564206d6178696d756d20616c6c6f7765646044820152606401610fc2565b88612d7561222f565b1015612dc35760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768204e4654206c65667420746f206d696e742e000000006044820152606401610fc2565b60215461ffff166000908152601a6020908152604080832060185460ff1684528252808320600185900b8452909152812060030154612e02908b615973565b6000858152601760205260409020805460ff191660011790559050348114612e6c5760405162461bcd60e51b815260206004820152601760248201527f556e6d6174636865642065746865722062616c616e63650000000000000000006044820152606401610fc2565b612e76338b6142e1565b60185460ff166000908152602080526040902054612e95908b90615abb565b60185460ff1660009081526020808052604080832093909355338252601490522054612ec2908b90615abb565b336000908152601460209081526040808320939093556015815282822060185460ff16835290522054612ef6908b90615abb565b33600090815260156020908152604080832060185460ff16845290915281209190915560018a900b12612f6d5733600090815260166020908152604080832060018d900b8452909152902054612f4d908b90615abb565b33600090815260166020908152604080832060018e900b84529091529020555b6000612710612f7b600d5490565b612f859034615973565b612f8f91906159a8565b9050612fa3600c546001600160a01b031690565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015612fdb573d6000803e3d6000fd5b5080600e54612fea9190615abb565b600e5550506001600b55505050505050505050565b60005b81811015611aa65761302d8585858585818110613021576130216159bc565b905060200201356114c0565b80613037816159d2565b915050613002565b6001600160a01b038216600090815260146020526040812054601854829060ff1661306f57600092505050610f85565b60215462010000900461ffff166000908152601e6020908152604080832060185460ff16845282528083205491805290912054106130b257600092505050610f85565b602154640100000000900461ffff166000908152601f60209081526040808320600188900b808552908352818420546001600160a01b038a168552601684528285209185529252909120541061310d57600092505050610f85565b60215461ffff166000908152601a6020908152604080832060185460ff9081168552908352818420600189900b8552909252909120600401541615613183575060215461ffff166000908152601a6020908152604080832060185460ff1684528252808320600187900b84529091529020600201545b601854600160c01b900461ffff1682106131a257600092505050610f85565b6001600160a01b038516600090815260156020908152604080832060185460ff16845290915290205481116131dc57600092505050610f85565b60215462010000900461ffff166000908152601e6020908152604080832060185460ff168452825280832054918052909120541061321f57600092505050610f85565b602154640100000000900461ffff166000908152601f60209081526040808320600188900b808552908352818420546001600160a01b038a168552601684528285209185529252909120541061327a57600092505050610f85565b601854600090613296908490600160c01b900461ffff16615a45565b6001600160a01b038716600090815260156020908152604080832060185460ff168452909152812054919250906132cd9084615a45565b60185460ff166000818152602080805260408083205460215462010000900461ffff168452601e835281842094845293909152812054929350916133119190615a45565b6001600160a01b038916600090815260166020908152604080832060018c900b80855290835281842054602154640100000000900461ffff168552601f84528285209185529252822054929350909161336a9190615a45565b905061339861337761222f565b61339361338d61338788886145db565b866145db565b846145db565b6145db565b9998505050505050505050565b600a546001600160a01b031633146133cf5760405162461bcd60e51b8152600401610fc2906158ed565b6018805460ff60a81b1916600160a81b179055565b600a546001600160a01b0316331461340e5760405162461bcd60e51b8152600401610fc2906158ed565b8015613444576021805461ffff16906000613428836159ed565b91906101000a81548161ffff021916908361ffff160217905550505b60215461ffff166000908152601a6020908152604080832060ff8a8116855290835281842060018a900b8552835292206004810154875193169261348a92880190614a0c565b5085601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b815260200190815260200160002060010160006101000a81548161ffff021916908360010b61ffff16021790555083601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b81526020019081526020016000206002018190555082601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b8152602001908152602001600020600301819055506001601a6000602160009054906101000a900461ffff1661ffff1661ffff16815260200190815260200160002060008960ff1660ff16815260200190815260200160002060008860010b60010b815260200190815260200160002060040160006101000a81548160ff0219169083151502179055508015613648575061135f565b60215461ffff9081166000908152601b6020908152604080832060ff8c16845290915281208054909216919061367d836159ed565b825461ffff91821661010093840a908102908302199091161790925560215482166000908152601c6020908152604080832060ff8e1684528252822080546001810182559083529120601082040180548b85166002600f9094169390930290930a91820291909302199091161790555050505050505050565b600a546001600160a01b031633146137205760405162461bcd60e51b8152600401610fc2906158ed565b6001600160a01b0381166137855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fc2565b611ae8816141e4565b600a546001600160a01b031633146137b85760405162461bcd60e51b8152600401610fc2906158ed565b60215461ffff166000908152601a6020908152604080832060ff8087168552908352818420600186900b8552909252909120600401541661382e5760405162461bcd60e51b815260206004820152601060248201526f149bdb19481b9bdd08195e1a5cdd195960821b6044820152606401610fc2565b604080516020808201808452600080845260215461ffff168152601a835284812060ff881682528352848120600187900b825290925292902090516138739290614a0c565b506021805461ffff9081166000908152601a6020818152604080842060ff8916808652908352818520600189810b80885291855283872001805461ffff1916905587548716865284845282862082875284528286208187528452828620600201869055875487168652848452828620828752845282862081875284528286206003018690558754871686529383528185208186528352818520938552928252808420600401805460ff19169055945484168352601b81528483209183525291822080549091169161394383615ad3565b91906101000a81548161ffff021916908361ffff1602179055505060005b60215461ffff166000908152601c6020908152604080832060ff80881685529252909120549082161015613a395760215461ffff166000908152601c6020908152604080832060ff808816855292529091208054600185900b9284169081106139cc576139cc6159bc565b60009182526020909120601082040154600f9091166002026101000a900460010b1415613a275760215461ffff166000908152601c6020908152604080832060ff80881685529252909120613a229183166145f1565b613a39565b80613a3181615a5c565b915050613961565b5060215461ffff9081166000908152601b6020908152604080832060ff8716845290915290205416610fd55760005b601d5460ff82161015611183578260ff16601d8260ff1681548110613a8f57613a8f6159bc565b60009182526020918290209181049091015460ff601f9092166101000a9004161415613ac357611183601d8260ff16614725565b80613acd81615a5c565b915050613a68565b60006001600160e01b0319821663152a902d60e11b1480610f855750610f85825b60006001600160e01b031982166380ac58cd60e01b1480613b2757506001600160e01b03198216635b5e139f60e01b145b80610f8557506301ffc9a760e01b6001600160e01b0319831614610f85565b600c546001600160a01b031633146114be5760405162461bcd60e51b815260206004820152602e60248201527f41706574696d69736d3a2063616c6c6572206973206e6f74207468652061706560448201526d74696d69736d206164647265737360901b6064820152608401610fc2565b6127106001600160601b0382161115613be25760405162461bcd60e51b8152600401610fc290615af1565b6001600160a01b038216613c385760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610fc2565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b600081613c7d60115490565b11158015613c8c575060005482105b8015610f85575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613d18826140bb565b9050836001600160a01b031681600001516001600160a01b031614613d4f5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480613d6d5750613d6d8533610e95565b80613d88575033613d7d846110bd565b6001600160a01b0316145b905080613da857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416613dcf57604051633a954ecd60e21b815260040160405180910390fd5b613ddb60008487613cb1565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116613eaf576000548214613eaf57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611aa6565b600a54600160a01b900460ff16613f515760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610fc2565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f3eb2f33c00581c6f2e7e2b3269c39eee6b0bea3e5e7e7ab1c05da8e8dbe8a8db90600090a35050565b6127106001600160601b038216111561401b5760405162461bcd60e51b8152600401610fc290615af1565b6001600160a01b0382166140715760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610fc2565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752600990529190942093519051909116600160a01b029116179055565b604080516060810182526000808252602082018190529181019190915281806140e360115490565b116141cb576000548110156141cb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906141c95780516001600160a01b031615614160579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156141c4579392505050565b614160565b505b604051636f96cda160e11b815260040160405180910390fd5b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff16156142835760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610fc2565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613f813390565b60006142c960115490565b60005403905090565b60606012805461103a90615922565b610fd5828260405180602001604052806000815250614848565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290614330903390899088908890600401615b3b565b602060405180830381600087803b15801561434a57600080fd5b505af192505050801561437a575060408051601f3d908101601f1916820190925261437791810190615b77565b60015b6143d5573d8080156143a8576040519150601f19603f3d011682016040523d82523d6000602084013e6143ad565b606091505b5080516143cd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060816144175750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614441578061442b816159d2565b915061443a9050600a836159a8565b915061441b565b6000816001600160401b0381111561445b5761445b614d34565b6040519080825280601f01601f191660200182016040528015614485576020820181803683370190505b5090505b84156143eb5761449a600183615a45565b91506144a7600a86615b94565b6144b2906030615abb565b60f81b8183815181106144c7576144c76159bc565b60200101906001600160f81b031916908160001a9053506144e9600a866159a8565b9450614489565b6000808560405160200161450691815260200190565b60405160208183030381529060405280519060200120905060008160405160200161455d91907f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b60408051601f1981840301815282825280516020918201206000845290830180835281905260ff8916918301919091526060820187905260808201869052915060019060a0016020604051602081039080840390855afa1580156145c5573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b60008183106145ea5781611cbb565b5090919050565b805b825461460190600190615a45565b81101561469e5782614614826001615abb565b81548110614624576146246159bc565b90600052602060002090601091828204019190066002029054906101000a900460010b838281548110614659576146596159bc565b90600052602060002090601091828204019190066002026101000a81548161ffff021916908360010b61ffff1602179055508080614696906159d2565b9150506145f3565b50815482906146af90600190615a45565b815481106146bf576146bf6159bc565b90600052602060002090601091828204019190066002026101000a81549061ffff0219169055818054806146f5576146f5615ba8565b600082815260209020601060001990920191820401805461ffff6002600f8516026101000a021916905590555050565b805b825461473590600190615a45565b8110156147c75782614748826001615abb565b81548110614758576147586159bc565b90600052602060002090602091828204019190069054906101000a900460ff1683828154811061478a5761478a6159bc565b90600052602060002090602091828204019190066101000a81548160ff021916908360ff16021790555080806147bf906159d2565b915050614727565b50815482906147d890600190615a45565b815481106147e8576147e86159bc565b90600052602060002090602091828204019190066101000a81549060ff02191690558180548061481a5761481a615ba8565b60019003818190600052602060002090602091828204019190066101000a81549060ff021916905590555050565b6000546001600160a01b03841661487157604051622e076360e81b815260040160405180910390fd5b8261488f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600490925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b156149b7575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461498060008784806001019550876142fb565b61499d576040516368d2bf6b60e11b815260040160405180910390fd5b8082106149355782600054146149b257600080fd5b6149fc565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106149b8575b5060009081556124819085838684565b828054614a1890615922565b90600052602060002090601f016020900481019282614a3a5760008555614a80565b82601f10614a5357805160ff1916838001178555614a80565b82800160010185558215614a80579182015b82811115614a80578251825591602001919060010190614a65565b50614a8c929150614ab1565b5090565b50805460008255601f016020900490600052602060002090810190611ae891905b5b80821115614a8c5760008155600101614ab2565b6001600160e01b031981168114611ae857600080fd5b600060208284031215614aee57600080fd5b8135611cbb81614ac6565b600060208284031215614b0b57600080fd5b5035919050565b80356001600160a01b0381168114614b2957600080fd5b919050565b80356001600160601b0381168114614b2957600080fd5b60008060408385031215614b5857600080fd5b614b6183614b12565b9150614b6f60208401614b2e565b90509250929050565b600060208284031215614b8a57600080fd5b611cbb82614b12565b60005b83811015614bae578181015183820152602001614b96565b838111156124815750506000910152565b60008151808452614bd7816020860160208601614b93565b601f01601f19169290920160200192915050565b602081526000611cbb6020830184614bbf565b60008060408385031215614c1157600080fd5b614c1a83614b12565b946020939093013593505050565b803560ff81168114614b2957600080fd5b600060208284031215614c4b57600080fd5b611cbb82614c28565b803561ffff81168114614b2957600080fd5b600080600060608486031215614c7b57600080fd5b614c8484614c54565b9250614c9260208501614c28565b9150604084013590509250925092565b600080600060608486031215614cb757600080fd5b614cc084614b12565b9250614c9260208501614b12565b60008060408385031215614ce157600080fd5b50508035926020909101359150565b60008083601f840112614d0257600080fd5b5081356001600160401b03811115614d1957600080fd5b6020830191508360208260051b850101111561131757600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715614d6c57614d6c614d34565b60405290565b60405160a081016001600160401b0381118282101715614d6c57614d6c614d34565b604051601f8201601f191681016001600160401b0381118282101715614dbc57614dbc614d34565b604052919050565b600082601f830112614dd557600080fd5b81356001600160401b03811115614dee57614dee614d34565b614e01601f8201601f1916602001614d94565b818152846020838601011115614e1657600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060808688031215614e4b57600080fd5b614e5486614b12565b9450614e6260208701614b12565b935060408601356001600160401b0380821115614e7e57600080fd5b614e8a89838a01614cf0565b90955093506060880135915080821115614ea357600080fd5b50614eb088828901614dc4565b9150509295509295909350565b60006001600160401b03821115614ed657614ed6614d34565b5060051b60200190565b8035600181900b8114614b2957600080fd5b600082601f830112614f0357600080fd5b81356020614f18614f1383614ebd565b614d94565b82815260069290921b84018101918181019086841115614f3757600080fd5b8286015b84811015614f7d5760408189031215614f545760008081fd5b614f5c614d4a565b614f6582614ee0565b81528185013585820152835291830191604001614f3b565b509695505050505050565b8015158114611ae857600080fd5b60008060408385031215614fa957600080fd5b82356001600160401b03811115614fbf57600080fd5b614fcb85828601614ef2565b9250506020830135614fdc81614f88565b809150509250929050565b600060208284031215614ff957600080fd5b611cbb82614ee0565b60006020828403121561501457600080fd5b81356001600160401b0381111561502a57600080fd5b6143eb84828501614dc4565b60008060006060848603121561504b57600080fd5b8335925061505b60208501614b12565b915061506960408501614b2e565b90509250925092565b6000602080838503121561508557600080fd5b82356001600160401b0381111561509b57600080fd5b8301601f810185136150ac57600080fd5b80356150ba614f1382614ebd565b81815260059190911b820183019083810190878311156150d957600080fd5b928401925b828410156150f7578335825292840192908401906150de565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561192f5761515983855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b928401926060929092019160010161511e565b60006020828403121561517e57600080fd5b611cbb82614c54565b6020808252825182820181905260009190848201906040850190845b8181101561192f578351835292840192918401916001016151a3565b600080600080606085870312156151d557600080fd5b6151de85614b12565b93506151ec60208601614b12565b925060408501356001600160401b0381111561520757600080fd5b61521387828801614cf0565b95989497509550505050565b60008060006060848603121561523457600080fd5b61523d84614b12565b95602085013595506040909401359392505050565b600082601f83011261526357600080fd5b81356020615273614f1383614ebd565b82815260059290921b8401810191818101908684111561529257600080fd5b8286015b84811015614f7d5780356001600160401b03808211156152b65760008081fd5b9088019060a0828b03601f19018113156152d05760008081fd5b6152d8614d72565b6152e3888501614c28565b815260406152f2818601614ee0565b898301526060808601358581111561530a5760008081fd5b6153188f8c838a0101614dc4565b928401929092526080868101359184019190915292909401359181019190915285525050918301918301615296565b600082601f83011261535857600080fd5b81356020615368614f1383614ebd565b82815260069290921b8401810191818101908684111561538757600080fd5b8286015b84811015614f7d57604081890312156153a45760008081fd5b6153ac614d4a565b6153b582614c28565b8152818501358582015283529183019160400161538b565b6000806000806000806000806000806101408b8d0312156153ed57600080fd5b6153f68b614b12565b995061540460208c01614b12565b985060408b01356001600160401b038082111561542057600080fd5b61542c8e838f01614dc4565b995061543a60608e01614b12565b985061544860808e01614b2e565b975061545660a08e01614c54565b965061546460c08e01614c54565b955060e08d013591508082111561547a57600080fd5b6154868e838f01615252565b94506101008d013591508082111561549d57600080fd5b6154a98e838f01615347565b93506101208d01359150808211156154c057600080fd5b506154cd8d828e01614ef2565b9150509295989b9194979a5092959850565b6000806000606084860312156154f457600080fd5b6154fd84614c54565b925061550b60208501614c28565b915061506960408501614ee0565b60a08152600061552c60a0830188614bbf565b90508560010b602083015284604083015283606083015282151560808301529695505050505050565b6000806040838503121561556857600080fd5b82356001600160401b0381111561557e57600080fd5b614fcb85828601615252565b6000806040838503121561559d57600080fd5b82356001600160401b038111156155b357600080fd5b614fcb85828601615347565b600080604083850312156155d257600080fd5b6155db83614b12565b91506020830135614fdc81614f88565b6020808252825182820181905260009190848201906040850190845b8181101561192f57835160ff1683529284019291840191600101615607565b6000806040838503121561563957600080fd5b61564283614b12565b9150614b6f60208401614ee0565b6000806000806080858703121561566657600080fd5b61566f85614b12565b935061567d60208601614b12565b92506040850135915060608501356001600160401b0381111561569f57600080fd5b6156ab87828801614dc4565b91505092959194509250565b6000806000606084860312156156cc57600080fd5b6156d584614c28565b92506020840135915060408401356156ec81614f88565b809150509250925092565b6000806040838503121561570a57600080fd5b61571383614c54565b9150614b6f60208401614c28565b6020808252825182820181905260009190848201906040850190845b8181101561192f578351600190810b845293850193928501920161573d565b60008060006060848603121561577157600080fd5b6156d584614ee0565b81516001600160a01b031681526020808301516001600160401b03169082015260408083015115159082015260608101610f85565b60008060008060008060c087890312156157c857600080fd5b863595506157d860208801614ee0565b9450604087013593506157ed60608801614c28565b92506080870135915060a087013590509295509295509295565b60008060008060008060c0878903121561582057600080fd5b61582987614c28565b955061583760208801614ee0565b945060408701356001600160401b0381111561585257600080fd5b61585e89828a01614dc4565b945050606087013592506080870135915060a087013561587d81614f88565b809150509295509295509295565b6000806040838503121561589e57600080fd5b6158a783614b12565b9150614b6f60208401614b12565b600080604083850312156158c857600080fd5b61564283614c54565b600080604083850312156158e457600080fd5b61564283614c28565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061593657607f821691505b6020821081141561595757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561598d5761598d61595d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826159b7576159b7615992565b500490565b634e487b7160e01b600052603260045260246000fd5b60006000198214156159e6576159e661595d565b5060010190565b600061ffff80831681811415615a0557615a0561595d565b6001019392505050565b600060208284031215615a2157600080fd5b5051919050565b600060208284031215615a3a57600080fd5b8151611cbb81614f88565b600082821015615a5757615a5761595d565b500390565b600060ff821660ff811415615a7357615a7361595d565b60010192915050565b60008351615a8e818460208801614b93565b835190830190615aa2818360208801614b93565b64173539b7b760d91b9101908152600501949350505050565b60008219821115615ace57615ace61595d565b500190565b600061ffff821680615ae757615ae761595d565b6000190192915050565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615b6d6080830184614bbf565b9695505050505050565b600060208284031215615b8957600080fd5b8151611cbb81614ac6565b600082615ba357615ba3615992565b500690565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220af9af34ebc1d0c1cc6f5208e7dca8c1b4ad7bbe45a66ebdb65c866680a96fe1464736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f
-----Decoded View---------------
Arg [0] : apetimismAddress_ (address): 0xE3636c01412c8309A78B89bDB80cac75BC0Ee07F
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e3636c01412c8309a78b89bdb80cac75bc0ee07f