ERC-721
Overview
Max Total Supply
854 SUBJECTS
Holders
127
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
188 SUBJECTSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SubjectRoot
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../modifiers/TunnelEnabled.sol"; import "./ISubjectRoot.sol"; import "../base/Subject.sol"; import "../base/SubjectWithGeneChanger.sol"; contract SubjectRoot is SubjectWithGeneChanger, ISubjectRoot, TunnelEnabled { using SubjectGeneGenerator for SubjectGeneGenerator.Gene; using SafeMath for uint256; using Counters for Counters.Counter; uint256 public subjectPrice; uint256 public bulkBuyLimit; uint256 public presaleStartDate; uint256 public presaleDuration; mapping(address => bool) public whitelistedWallets; address[] public whitelistedContracts; uint256 public baseGenomeChangePrice; uint256 public randomizeGenomePrice; event SubjectPriceChanged(uint256 newSubjectPrice); event MaxSupplyChanged(uint256 newMaxSupply); event BulkBuyLimitChanged(uint256 newBulkBuyLimit); event BaseGenomeChangePriceChanged(uint256 newGenomeChange); event RandomizeGenomePriceChanged(uint256 newRandomizeGenomePriceChange); event PresaleStartDateSet(uint256 _presaleStartDate); event PresaleDurationSet(uint256 _presaleDuration); event WhitelistedWalletsSet(address[] _whitelistedWallets); event WhitelistedContractsSet(address[] _whitelistedContracts); constructor( string memory name, string memory symbol, string memory baseURI, address payable _daoAddress, uint256 _subjectPrice, uint256 _maxSupply, uint256 _bulkBuyLimit, uint256 _baseGenomeChangePrice, uint256 _randomizeGenomePrice, string memory _arweaveAssetsJSON ) SubjectWithGeneChanger( name, symbol, baseURI, _daoAddress, _maxSupply, _arweaveAssetsJSON ) { subjectPrice = _subjectPrice; bulkBuyLimit = _bulkBuyLimit; baseGenomeChangePrice = _baseGenomeChangePrice; randomizeGenomePrice = _randomizeGenomePrice; arweaveAssetsJSON = _arweaveAssetsJSON; geneGenerator.random(); } function mint() private nonReentrant { require(_tokenIdTracker.current() < maxSupply, "Total supply reached"); _tokenIdTracker.increment(); uint256 tokenId = _tokenIdTracker.current(); if (_bossTokens[tokenId] != 0) { _genes[tokenId] = _bossTokens[tokenId]; } else { _genes[tokenId] = setUpRareTraitsInGenome(geneGenerator.random()); } (bool transferToDaoStatus, ) = daoAddress.call{value: subjectPrice}( "" ); require( transferToDaoStatus, "Address: unable to send value, recipient may have reverted" ); uint256 excessAmount = msg.value.sub(subjectPrice); if (excessAmount > 0) { (bool returnExcessStatus, ) = _msgSender().call{ value: excessAmount }(""); require(returnExcessStatus, "Failed to return excess."); } _mint(_msgSender(), tokenId); _setTokenRoyalty(tokenId, daoAddress, royaltyFeeBps); emit TokenMinted(tokenId, _genes[tokenId]); emit TokenMorphed( tokenId, 0, _genes[tokenId], subjectPrice, SubjectEventType.MINT ); } function bulkBuy(uint256 amount) private nonReentrant { require( amount <= bulkBuyLimit, "Cannot bulk buy more than the preset limit" ); require( _tokenIdTracker.current().add(amount) <= maxSupply, "Total supply reached" ); (bool transferToDaoStatus, ) = daoAddress.call{ value: subjectPrice.mul(amount) }(""); require( transferToDaoStatus, "Address: unable to send value, recipient may have reverted" ); uint256 excessAmount = msg.value.sub(subjectPrice.mul(amount)); if (excessAmount > 0) { (bool returnExcessStatus, ) = _msgSender().call{ value: excessAmount }(""); require(returnExcessStatus, "Failed to return excess."); } for (uint256 i = 0; i < amount; i++) { _tokenIdTracker.increment(); uint256 tokenId = _tokenIdTracker.current(); if (_bossTokens[tokenId] != 0) { _genes[tokenId] = _bossTokens[tokenId]; } else { _genes[tokenId] = setUpRareTraitsInGenome(geneGenerator.random()); } _mint(_msgSender(), tokenId); _setTokenRoyalty(tokenId, daoAddress, royaltyFeeBps); emit TokenMinted(tokenId, _genes[tokenId]); emit TokenMorphed( tokenId, 0, _genes[tokenId], subjectPrice, SubjectEventType.MINT ); } } function mint(address to) public pure override(ERC721PresetMinterPauserAutoId) { revert("Should not use this one"); } /** * @notice Invokes `mint` if presale has started and msg.sender is whitelisted. * * Requirements: * - the caller must be whitelisted. * - the presale must have started. */ function mintTokenOnPresale() public override payable { require( (block.timestamp > presaleStartDate) && (block.timestamp < (presaleStartDate + presaleDuration)), "Current timestamp is not in the bounds of the presale period" ); require(whitelistedWallets[msg.sender] || isHodler(msg.sender), "You are not eligible for presale"); mint(); } /** * @notice Invokes `mint`. */ function mintTokenOnSale() public override payable { require( block.timestamp > (presaleStartDate + presaleDuration), "Sale period not started!" ); mint(); } /** * @notice Invokes `bulkBuy` if presale has started and msg.sender is whitelisted. * * Requirements: * - the caller must be whitelisted. * - the presale must have started. */ function bulkBuyTokensOnPresale(uint256 quantity) public override payable { require( (block.timestamp > presaleStartDate) && (block.timestamp < (presaleStartDate + presaleDuration)), "Current timestamp is not in the bounds of the presale period" ); require(whitelistedWallets[msg.sender] || isHodler(msg.sender), "You are not eligible for presale"); bulkBuy(quantity); } /** * @notice Invokes `bulkBuy` with the quantity requested. */ function bulkBuyTokensOnSale(uint256 quantity) public override payable { require( block.timestamp > (presaleStartDate + presaleDuration), "Sale period not started!" ); bulkBuy(quantity); } function reserveMint(uint256 amount) public virtual override onlyDAO { require( _tokenIdTracker.current().add(amount) <= maxSupply, "Total supply reached" ); for (uint256 i = 0; i < amount; i++) { _tokenIdTracker.increment(); uint256 tokenId = _tokenIdTracker.current(); if (_bossTokens[tokenId] != 0) { _genes[tokenId] = _bossTokens[tokenId]; } else { _genes[tokenId] = setUpRareTraitsInGenome(geneGenerator.random()); } _mint(_msgSender(), tokenId); _setTokenRoyalty(tokenId, daoAddress, royaltyFeeBps); emit TokenMinted(tokenId, _genes[tokenId]); emit TokenMorphed( tokenId, 0, _genes[tokenId], subjectPrice, SubjectEventType.MINT ); } } receive() external payable { mint(); } function generateBossCharacters(uint256[] calldata entries) public virtual override onlyDAO { require(entries.length == 10, "Should be 10 boss genes!"); for (uint256 i = 0; i < entries.length; i++) { require(entries[i] != 0, "Null gene"); uint256 selectedToken = (geneGenerator.random() % (maxSupply - 1)) + 1; if (_bossTokens[selectedToken] != 0) { i--; continue; } _bossTokens[selectedToken] = entries[i]; } emit BossCharactersGenerated(entries); } function morphGene(uint256 tokenId, uint256 genePosition) public override payable { _morphGene(tokenId, genePosition, priceForGenomeChange(tokenId)); } function randomizeGenome(uint256 tokenId) public override payable { _randomizeGenome(tokenId, randomizeGenomePrice); } function setSubjectPrice(uint256 newSubjectPrice) public virtual override onlyDAO { subjectPrice = newSubjectPrice; emit SubjectPriceChanged(newSubjectPrice); } function setMaxSupply(uint256 _maxSupply) public virtual override onlyDAO { maxSupply = _maxSupply; emit MaxSupplyChanged(maxSupply); } function setBulkBuyLimit(uint256 _bulkBuyLimit) public virtual override onlyDAO { bulkBuyLimit = _bulkBuyLimit; emit BulkBuyLimitChanged(_bulkBuyLimit); } function changeBaseGenomeChangePrice(uint256 newGenomeChangePrice) public virtual override onlyDAO { baseGenomeChangePrice = newGenomeChangePrice; emit BaseGenomeChangePriceChanged(newGenomeChangePrice); } function changeRandomizeGenomePrice(uint256 newRandomizeGenomePrice) public virtual override onlyDAO { randomizeGenomePrice = newRandomizeGenomePrice; emit RandomizeGenomePriceChanged(newRandomizeGenomePrice); } /** * @notice Sets presaleStartDate. * @param _presaleStartDate uint256 representing the start date of the presale */ function setPresaleStartDate(uint256 _presaleStartDate) public virtual override onlyDAO { require( _presaleStartDate > block.timestamp, "Presale: start must be in future!" ); presaleStartDate = _presaleStartDate; emit PresaleStartDateSet(presaleStartDate); } /** * @notice Sets presaleDuration. * @param _presaleDuration uint256 representing the duration of the presale */ function setPresaleDuration(uint256 _presaleDuration) public virtual override onlyDAO { require(_presaleDuration > 0, "Presale: not a valid duration!"); presaleDuration = _presaleDuration; emit PresaleDurationSet(presaleDuration); } /** * @notice Sets whitelisted wallets. * @param beneficiaries address[] representing the user who will be whitelisted */ function setWhitelistedWallets(address[] memory beneficiaries) public virtual override onlyDAO { require( beneficiaries.length > 0, "Beneficiaries array length must greater than 0" ); for (uint256 i = 0; i < beneficiaries.length; i++) { require(beneficiaries[i] != address(0), "Null address"); whitelistedWallets[beneficiaries[i]] = true; } emit WhitelistedWalletsSet(beneficiaries); } /** * @notice Sets whitelisted contracts that implement open zeppelin's IERC721 interface. * @param beneficiaries address[] representing the contract which hodlers will be whitelisted */ function setWhitelistedContracts(address[] memory beneficiaries) public virtual override onlyDAO { require( beneficiaries.length > 0, "Beneficiaries array length must greater than 0" ); for (uint256 i = 0; i < beneficiaries.length; i++) { require(beneficiaries[i] != address(0), "Null address"); } whitelistedContracts = beneficiaries; emit WhitelistedContractsSet(beneficiaries); } function isHodler(address walletAddress) internal view returns (bool) { for (uint i = 0; i < whitelistedContracts.length; i++) { if (IERC721(whitelistedContracts[i]).balanceOf(walletAddress) > 0) { return true; } } return false; } function priceForGenomeChange(uint256 tokenId) public view virtual override returns (uint256 price) { uint256 pastChanges = _genomeChanges[tokenId]; return baseGenomeChangePrice.mul(1 << pastChanges); } function isEligibleForPresale(address walletAddress) public view override isValidAddress(walletAddress) returns (bool) { return whitelistedWallets[walletAddress] || isHodler(walletAddress); } function wormholeUpdateGene( uint256 tokenId, uint256 gene, bool _isNotVirgin, uint256 genomeChangesCount ) external nonReentrant onlyTunnel { uint256 oldGene = _genes[tokenId]; _genes[tokenId] = gene; isNotVirgin[tokenId] = _isNotVirgin; _genomeChanges[tokenId] = genomeChangesCount; emit TokenMorphed( tokenId, oldGene, _genes[tokenId], priceForGenomeChange(tokenId), SubjectEventType.MORPH ); } function whitelistBridgeAddress(address bridgeAddress, bool status) external override onlyDAO { whitelistTunnelAddresses[bridgeAddress] = status; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; abstract contract TunnelEnabled { mapping(address => bool) public whitelistTunnelAddresses; modifier onlyTunnel() { require( whitelistTunnelAddresses[msg.sender], "Not called from the tunnel" ); _; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface ISubjectRoot is IERC721 { function mintTokenOnPresale() external payable; function mintTokenOnSale() external payable; function bulkBuyTokensOnPresale(uint256 amount) external payable; function bulkBuyTokensOnSale(uint256 amount) external payable; function reserveMint(uint256 amount) external; function generateBossCharacters(uint256[] calldata entries) external; function morphGene(uint256 tokenId, uint256 genePosition) external payable; function randomizeGenome(uint256 tokenId) external payable; function setSubjectPrice(uint256 newSubjectPrice) external; function setMaxSupply(uint256 maxSupply) external; function setBulkBuyLimit(uint256 bulkBuyLimit) external; function changeBaseGenomeChangePrice(uint256 newGenomeChangePrice) external; function changeRandomizeGenomePrice(uint256 newRandomizeGenomePrice) external; function setPresaleStartDate(uint256 presaleStartDate) external; function setPresaleDuration(uint256 presaleDuration) external; function setWhitelistedWallets(address[] memory beneficiaries) external; function setWhitelistedContracts(address[] memory beneficiaries) external; function priceForGenomeChange(uint256 tokenId) external view returns (uint256 price); function isEligibleForPresale(address walletAddress) external view returns (bool); function whitelistBridgeAddress(address bridgeAddress, bool status) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "./ISubject.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "../base/ERC721PresetMinterPauserAutoId.sol"; import "../lib/SubjectGeneGenerator.sol"; import "../modifiers/DAOControlled.sol"; import "../modifiers/ValidAddress.sol"; import "./ERC2981Royalties.sol"; abstract contract Subject is ISubject, ERC721PresetMinterPauserAutoId, ReentrancyGuard, ERC2981Royalties, DAOControlled, ValidAddress { using SafeMath for uint256; using Counters for Counters.Counter; using SubjectGeneGenerator for SubjectGeneGenerator.Gene; SubjectGeneGenerator.Gene internal geneGenerator; mapping(uint256 => uint256) internal _genes; mapping(uint256 => uint256) internal _bossTokens; uint256[7] internal _rareTraitsChances; uint256 public maxSupply; string public arweaveAssetsJSON; uint256 public immutable royaltyFeeBps = 500; event TokenMorphed( uint256 indexed tokenId, uint256 oldGene, uint256 newGene, uint256 price, SubjectEventType eventType ); event TokenMinted(uint256 indexed tokenId, uint256 newGene); event BossCharactersGenerated(uint256[] bossCharactersGenes); event RareTraitsChancesChanged(uint256[] rareTraitsChances); event DaoAddressChanged(address newDaoAddress); event BaseURIChanged(string baseURI); event ArweaveAssetsJSONChanged(string arweaveAssetsJSON); enum SubjectEventType { MINT, MORPH, TRANSFER } constructor( string memory name, string memory symbol, string memory baseURI, address payable _daoAddress, uint256 _maxSupply, string memory _arweaveAssetsJSON ) DAOControlled(_daoAddress) ERC721PresetMinterPauserAutoId(name, symbol, baseURI) { maxSupply = _maxSupply; arweaveAssetsJSON = _arweaveAssetsJSON; } function geneOf(uint256 tokenId) public view virtual override returns (uint256 gene) { return _genes[tokenId]; } function lastTokenId() public view override returns (uint256 tokenId) { return _tokenIdTracker.current(); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721PresetMinterPauserAutoId) { ERC721PresetMinterPauserAutoId._beforeTokenTransfer(from, to, tokenId); emit TokenMorphed( tokenId, _genes[tokenId], _genes[tokenId], 0, SubjectEventType.TRANSFER ); } function setRareTraitsChances(uint256[] calldata entries) public virtual override onlyDAO { require(entries.length == 7, "Entries number should match traits number!"); for (uint256 i = 0; i < entries.length; i++) { _rareTraitsChances[i] = entries[i]; } } function setDaoAddress(address payable _daoAddress) public virtual override onlyDAO isValidAddress(_daoAddress) { daoAddress = _daoAddress; DAOControlled(daoAddress); emit DaoAddressChanged(_daoAddress); } function setBaseURI(string memory _baseURI) public virtual override onlyDAO { _setBaseURI(_baseURI); emit BaseURIChanged(_baseURI); } function setArweaveAssetsJSON(string memory _arweaveAssetsJSON) public virtual override onlyDAO { arweaveAssetsJSON = _arweaveAssetsJSON; emit ArweaveAssetsJSONChanged(_arweaveAssetsJSON); } function isTokenBoss(uint256 tokenId) public view returns (bool, uint256) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); bool isBoss; uint256 gene; if (_bossTokens[tokenId] != 0) { isBoss = true; gene = _bossTokens[tokenId]; } return (isBoss, gene); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721PresetMinterPauserAutoId, ERC165Storage, IERC165) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../lib/SubjectGeneGenerator.sol"; import "../base/Subject.sol"; import "./ISubjectWithGeneChanger.sol"; abstract contract SubjectWithGeneChanger is ISubjectWithGeneChanger, Subject { using SubjectGeneGenerator for SubjectGeneGenerator.Gene; using SafeMath for uint256; using Address for address; mapping(uint256 => uint256) internal _genomeChanges; mapping(uint256 => bool) public isNotVirgin; constructor( string memory name, string memory symbol, string memory baseURI, address payable _daoAddress, uint256 _maxSupply, string memory _arweaveAssetsJSON ) Subject( name, symbol, baseURI, _daoAddress, _maxSupply, _arweaveAssetsJSON ) { } function _morphGene(uint256 tokenId, uint256 genePosition, uint256 price) internal nonReentrant { require(_bossTokens[tokenId] == 0, "Boss character not morphable"); require(genePosition > 0, "Base character not morphable"); require(genePosition < 7 || genePosition > 11 , "Rare traits not morphable"); _beforeGenomeChange(tokenId); (bool transferToDaoStatus, ) = daoAddress.call{value: price}(""); require( transferToDaoStatus, "Address: unable to send value, recipient may have reverted" ); uint256 excessAmount = msg.value.sub(price); if (excessAmount > 0) { (bool returnExcessStatus, ) = _msgSender().call{ value: excessAmount }(""); require(returnExcessStatus, "Failed to return excess."); } uint256 oldGene = _genes[tokenId]; uint256 newTrait = geneGenerator.random() % 100; // if we scramble base genes (there are no rare characters and backgrounds) if (genePosition > 1 && genePosition < 7) { // 1. Chance of rare genome change for each trait if ((geneGenerator.random() % 100) + 1 <= _rareTraitsChances[genePosition]) { // if we're lucky // 2. Correct gene position for rare genes _genes[tokenId] = replaceGene(oldGene, newTrait, genePosition + 5); } else { // otherwise just regular gene morphing _genes[tokenId] = replaceGene(oldGene, newTrait, genePosition); // Clean up rare trait _genes[tokenId] = replaceGene(_genes[tokenId], 0, genePosition + 5); } } else { // leaving room for scrambling rest of the genome in future (where genePosition is > 11) _genes[tokenId] = replaceGene(oldGene, newTrait, genePosition); } _genomeChanges[tokenId]++; isNotVirgin[tokenId] = true; emit TokenMorphed( tokenId, oldGene, _genes[tokenId], price, SubjectEventType.MORPH ); } function replaceGene( uint256 genome, uint256 replacement, uint256 genePosition ) internal pure virtual returns (uint256 newGene) { require(genePosition < 38, "Bad gene position"); uint256 mod = 0; if (genePosition > 0) { mod = genome.mod(10**(genePosition * 2)); // Each gene is 2 digits long } uint256 div = genome.div(10**((genePosition + 1) * 2)).mul( 10**((genePosition + 1) * 2) ); uint256 insert = replacement * (10**(genePosition * 2)); newGene = div.add(insert).add(mod); return newGene; } function _randomizeGenome(uint256 tokenId, uint256 randomizeGenomePrice) internal nonReentrant { require(_bossTokens[tokenId] == 0, "Boss character not morphable"); _beforeGenomeChange(tokenId); (bool transferToDaoStatus, ) = daoAddress.call{ value: randomizeGenomePrice }(""); require( transferToDaoStatus, "Address: unable to send value, recipient may have reverted" ); uint256 excessAmount = msg.value.sub(randomizeGenomePrice); if (excessAmount > 0) { (bool returnExcessStatus, ) = _msgSender().call{ value: excessAmount }(""); require(returnExcessStatus, "Failed to return excess."); } uint256 oldGene = _genes[tokenId]; _genes[tokenId] = setUpRareTraitsInGenome(geneGenerator.random()); _genomeChanges[tokenId] = 0; isNotVirgin[tokenId] = true; emit TokenMorphed( tokenId, oldGene, _genes[tokenId], randomizeGenomePrice, SubjectEventType.MORPH ); } function setUpRareTraitsInGenome(uint256 genome) internal returns (uint256) { for (uint256 genePosition = 2; genePosition < 7; genePosition++) { // 0. Clean up genome first genome = replaceGene(genome, 0, genePosition + 5); // 1. Chance of rare genome change for each trait // 1.1. There are no rare characters and backgrounds if (genePosition > 1 && (geneGenerator.random() % 100) + 1 <= _rareTraitsChances[genePosition]) { // 2. Correct gene position for rare genes genome = replaceGene(genome, geneGenerator.random() % 100, genePosition + 5); } } return genome; } function genomeChanges(uint256 tokenId) public view override returns (uint256 genomeChnages) { return _genomeChanges[tokenId]; } function _beforeGenomeChange(uint256 tokenId) internal view { require( !address(_msgSender()).isContract(), "Caller cannot be a contract" ); require( _msgSender() == tx.origin, "Msg sender should be original caller" ); beforeTransfer(tokenId, _msgSender()); } function beforeTransfer(uint256 tokenId, address owner) internal view { require( ownerOf(tokenId) == owner, "SubjectWithGeneChanger: cannot change genome of token that is not own" ); } }
// 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: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface ISubject is IERC721 { function geneOf(uint256 tokenId) external view returns (uint256 gene); function lastTokenId() external view returns (uint256 tokenId); function setRareTraitsChances(uint256[] calldata entries) external; function setDaoAddress(address payable daoAddress) external; function setBaseURI(string memory _baseURI) external; function setArweaveAssetsJSON(string memory _arweaveAssetsJSON) external; }
// 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/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; /** * @dev {ERC721} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * - token ID and URI autogeneration * * This contract uses {AccessControl} to lock permissioned functions using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract ERC721PresetMinterPauserAutoId is Context, AccessControlEnumerable, ERC721Enumerable, ERC721Burnable, ERC721Pausable { using Counters for Counters.Counter; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); Counters.Counter internal _tokenIdTracker; string private _baseTokenURI; /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the * account that deploys the contract. * * Token URIs will be autogenerated based on `baseURI` and their token IDs. * See {ERC721-tokenURI}. */ constructor( string memory name, string memory symbol, string memory baseTokenURI ) ERC721(name, symbol) { _baseTokenURI = baseTokenURI; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(MINTER_ROLE, _msgSender()); _setupRole(PAUSER_ROLE, _msgSender()); } function _setBaseURI(string memory baseURI_) internal virtual { _baseTokenURI = baseURI_; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function baseURI() external view virtual returns (string memory) { return _baseURI(); } /** * @dev Creates a new token for `to`. Its token ID will be automatically * assigned (and available on the emitted {IERC721-Transfer} event), and the token * URI autogenerated based on the base URI passed at construction. * * See {ERC721-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); // We cannot just use balanceOf to create the new tokenId because tokens // can be burned (destroyed), so we need a separate counter. _mint(to, _tokenIdTracker.current()); _tokenIdTracker.increment(); } /** * @dev Pauses all token transfers. * * See {ERC721Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); _pause(); } /** * @dev Unpauses all token transfers. * * See {ERC721Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); _unpause(); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { super._beforeTokenTransfer(from, to, tokenId); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; library SubjectGeneGenerator { struct Gene { uint256 lastRandom; } function random(Gene storage g) internal returns (uint256) { g.lastRandom = uint256(keccak256(abi.encode(keccak256(abi.encodePacked(msg.sender, tx.origin, gasleft(), g.lastRandom, block.timestamp, block.number, blockhash(block.number), blockhash(block.number-100)))))); return g.lastRandom; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; abstract contract DAOControlled { address payable public daoAddress; constructor(address payable _daoAddress) { daoAddress = _daoAddress; } modifier onlyDAO() { require(msg.sender == daoAddress, "Not called from the dao"); _; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; abstract contract ValidAddress { modifier isValidAddress(address addr) { require(addr != address(0), "Not a valid address!"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol"; import "./IERC2981Royalties.sol"; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981Royalties is ERC165Storage, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } mapping(uint256 => RoyaltyInfo) internal _royalties; bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; constructor() { _registerInterface(_INTERFACE_ID_ERC2981); } /// @dev Sets token royalties /// @param tokenId the token id fir which we register the royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function _setTokenRoyalty( uint256 tokenId, address recipient, uint256 value ) internal { require(value <= 10000, "ERC2981Royalties: Too high"); _royalties[tokenId] = RoyaltyInfo(recipient, uint24(value)); } function royaltyInfo(uint256 tokenId, uint256 value) external view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties[tokenId]; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // 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; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @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 virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @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) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 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 virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _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 { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @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`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * 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 ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a 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 _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// 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 (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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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); } } } }
// 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 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 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// 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 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) pragma solidity ^0.8.0; import "./ERC165.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Storage is ERC165 { /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title IERC2981Royalties /// @dev Interface for the ERC2981 - Token Royalty standard interface IERC2981Royalties { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _value - the sale price of the NFT asset specified by _tokenId /// @return _receiver - address of who should be sent the royalty payment /// @return _royaltyAmount - the royalty payment amount for value sale price function royaltyInfo(uint256 _tokenId, uint256 _value) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface ISubjectWithGeneChanger { function genomeChanges(uint256 tokenId) external view returns (uint256 genomeChanges); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"address payable","name":"_daoAddress","type":"address"},{"internalType":"uint256","name":"_subjectPrice","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_bulkBuyLimit","type":"uint256"},{"internalType":"uint256","name":"_baseGenomeChangePrice","type":"uint256"},{"internalType":"uint256","name":"_randomizeGenomePrice","type":"uint256"},{"internalType":"string","name":"_arweaveAssetsJSON","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"arweaveAssetsJSON","type":"string"}],"name":"ArweaveAssetsJSONChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newGenomeChange","type":"uint256"}],"name":"BaseGenomeChangePriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"bossCharactersGenes","type":"uint256[]"}],"name":"BossCharactersGenerated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newBulkBuyLimit","type":"uint256"}],"name":"BulkBuyLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newDaoAddress","type":"address"}],"name":"DaoAddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"MaxSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_presaleDuration","type":"uint256"}],"name":"PresaleDurationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_presaleStartDate","type":"uint256"}],"name":"PresaleStartDateSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRandomizeGenomePriceChange","type":"uint256"}],"name":"RandomizeGenomePriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"rareTraitsChances","type":"uint256[]"}],"name":"RareTraitsChancesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newSubjectPrice","type":"uint256"}],"name":"SubjectPriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newGene","type":"uint256"}],"name":"TokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldGene","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newGene","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"enum Subject.SubjectEventType","name":"eventType","type":"uint8"}],"name":"TokenMorphed","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_whitelistedContracts","type":"address[]"}],"name":"WhitelistedContractsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_whitelistedWallets","type":"address[]"}],"name":"WhitelistedWalletsSet","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[],"name":"arweaveAssetsJSON","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"baseGenomeChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bulkBuyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"bulkBuyTokensOnPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"bulkBuyTokensOnSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newGenomeChangePrice","type":"uint256"}],"name":"changeBaseGenomeChangePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRandomizeGenomePrice","type":"uint256"}],"name":"changeRandomizeGenomePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"daoAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"geneOf","outputs":[{"internalType":"uint256","name":"gene","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"entries","type":"uint256[]"}],"name":"generateBossCharacters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"genomeChanges","outputs":[{"internalType":"uint256","name":"genomeChnages","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"walletAddress","type":"address"}],"name":"isEligibleForPresale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isNotVirgin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenBoss","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTokenId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"mintTokenOnPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintTokenOnSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"genePosition","type":"uint256"}],"name":"morphGene","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"presaleDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleStartDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"priceForGenomeChange","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"randomizeGenome","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"randomizeGenomePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reserveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_arweaveAssetsJSON","type":"string"}],"name":"setArweaveAssetsJSON","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bulkBuyLimit","type":"uint256"}],"name":"setBulkBuyLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_daoAddress","type":"address"}],"name":"setDaoAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleDuration","type":"uint256"}],"name":"setPresaleDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleStartDate","type":"uint256"}],"name":"setPresaleStartDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"entries","type":"uint256[]"}],"name":"setRareTraitsChances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSubjectPrice","type":"uint256"}],"name":"setSubjectPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"beneficiaries","type":"address[]"}],"name":"setWhitelistedContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"beneficiaries","type":"address[]"}],"name":"setWhitelistedWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"subjectPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridgeAddress","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelistBridgeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistTunnelAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistedContracts","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedWallets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"gene","type":"uint256"},{"internalType":"bool","name":"_isNotVirgin","type":"bool"},{"internalType":"uint256","name":"genomeChangesCount","type":"uint256"}],"name":"wormholeUpdateGene","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040526101f46080523480156200001757600080fd5b5060405162006371380380620063718339810160408190526200003a91620005a1565b89898989888585858585858582868686828281600290805190602001906200006492919062000438565b5080516200007a90600390602084019062000438565b5050600c805460ff191690555080516200009c90600e90602084019062000438565b50620000b36000620000ad620001cf565b620001d3565b620000e27f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6620000ad620001cf565b620001117f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a620000ad620001cf565b50506001600f55506200012b63152a902d60e11b620001e3565b601280546001600160a01b0319166001600160a01b0392909216919091179055601d82905580516200016590601e90602084019062000438565b505050505050505050505050508560228190555083602381905550826028819055508160298190555080601e9080519060200190620001a692919062000438565b50620001be60136200023e60201b620026041760201c565b505050505050505050505062000799565b3390565b620001df8282620002bb565b5050565b6001600160e01b03198082161415620002195760405162461bcd60e51b81526004016200021090620006eb565b60405180910390fd5b6001600160e01b0319166000908152601060205260409020805460ff19166001179055565b600033325a8454424380406200025660648362000722565b40604051602001620002709897969594939291906200069a565b60405160208183030381529060405280519060200120604051602001620002989190620006e2565b60408051601f19818403018152919052805160209091012080835590505b919050565b620002d28282620002fe60201b620026781760201c565b6000828152600160209081526040909120620002f9918390620026fd62000388821b17901c565b505050565b6200030a8282620003a8565b620001df576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905562000344620001cf565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006200039f836001600160a01b038416620003d1565b90505b92915050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000620003df838362000420565b6200041757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003a2565b506000620003a2565b60009081526001919091016020526040902054151590565b828054620004469062000746565b90600052602060002090601f0160209004810192826200046a5760008555620004b5565b82601f106200048557805160ff1916838001178555620004b5565b82800160010185558215620004b5579182015b82811115620004b557825182559160200191906001019062000498565b50620004c3929150620004c7565b5090565b5b80821115620004c35760008155600101620004c8565b80516001600160a01b0381168114620002b657600080fd5b600082601f83011262000507578081fd5b81516001600160401b038082111562000524576200052462000783565b6040516020601f8401601f19168201810183811183821017156200054c576200054c62000783565b604052838252858401810187101562000563578485fd5b8492505b8383101562000586578583018101518284018201529182019162000567565b838311156200059757848185840101525b5095945050505050565b6000806000806000806000806000806101408b8d031215620005c1578586fd5b8a516001600160401b0380821115620005d8578788fd5b620005e68e838f01620004f6565b9b5060208d0151915080821115620005fc578788fd5b6200060a8e838f01620004f6565b9a5060408d015191508082111562000620578788fd5b6200062e8e838f01620004f6565b99506200063e60608e01620004de565b985060808d0151975060a08d0151965060c08d0151955060e08d015194506101008d015193506101208d015191508082111562000679578283fd5b50620006888d828e01620004f6565b9150509295989b9194979a5092959850565b6001600160601b03196060998a1b811682529790981b9096166014880152602887019490945260488601929092526068850152608884015260a883015260c882015260e80190565b90815260200190565b6020808252601c908201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604082015260600190565b6000828210156200074157634e487b7160e01b81526011600452602481fd5b500390565b6002810460018216806200075b57607f821691505b602082108114156200077d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b608051615ba7620007ca60003960008181610f030152818161143001528181611f3c0152612f250152615ba76000f3fe60806040526004361061044b5760003560e01c80636a62784211610234578063a80dcfee1161012e578063d45d0622116100b6578063e985e9c51161007a578063e985e9c514610c79578063e9ecbe7414610c99578063ec9c074c14610cae578063f528a62714610cc3578063f84ddf0b14610cd85761045a565b8063d45d062214610c12578063d539139314610c1a578063d547741f14610c2f578063d5abeb0114610c4f578063e63ab1e914610c645761045a565b8063c87b56dd116100fd578063c87b56dd14610b7d578063ca15c87314610b9d578063cccb6d0d14610bbd578063ce14617d14610bdd578063d45351e514610bf25761045a565b8063a80dcfee14610b15578063ab39a3c814610b35578063b88d4fde14610b55578063c233a09314610b755761045a565b806394229ed0116101bc5780639a559e13116101805780639a559e1314610a985780639e7bb46714610ab8578063a217fddf14610acb578063a22cb46514610ae0578063a49bccca14610b005761045a565b806394229ed014610a1057806395d89b4114610a3057806398af666b14610a4557806398c5c07814610a585780639a3cac6a14610a785761045a565b806380a3a7831161020357806380a3a783146109915780638456cb59146109a65780639010d07c146109bb57806391192765146109db57806391d14854146109f05761045a565b80636a6278421461091c5780636c0360eb1461093c5780636f8b44b01461095157806370a08231146109715761045a565b806336568abe116103455780634f6ccce7116102cd5780635c975abb116102915780635c975abb146108875780635e468dfd1461089c5780636352211e146108bc5780636a1c03dc146108dc5780636a5be686146108fc5761045a565b80634f6ccce7146107ff57806355f804b31461081f57806356a5c9261461083f57806356b1b300146108525780635868c32a146108725761045a565b806342842e0e1161031457806342842e0e1461075f57806342966c681461077f57806342e0f7921461079f5780634438759e146107bf5780634df77416146107df5761045a565b806336568abe146106e957806339d6fd7b146107095780633f4ba83a14610737578063413859361461074c5761045a565b806318160ddd116103d3578063248a9ca311610397578063248a9ca31461063b578063289ea0a91461065b5780632a55205a1461067b5780632f2ff15d146106a95780632f745c59146106c95761045a565b806318160ddd146105a45780631ef4eb5c146105c65780632131c68c146105e657806323b872dd146105fb57806323c8d07a1461061b5761045a565b806306fdde031161041a57806306fdde0314610502578063081812fc14610524578063095ea7b3146105445780631342ff4c14610564578063162c8641146105845761045a565b806301ffc9a71461045f5780630259dae714610495578063032ff473146104b557806304a3e2e5146104d55761045a565b3661045a57610458610ced565b005b600080fd5b34801561046b57600080fd5b5061047f61047a366004614826565b610fb8565b60405161048c9190614b2b565b60405180910390f35b3480156104a157600080fd5b506104586104b03660046147c9565b610fcb565b3480156104c157600080fd5b506104586104d03660046146a7565b611055565b3480156104e157600080fd5b506104f56104f03660046147c9565b6111a0565b60405161048c9190614a3a565b34801561050e57600080fd5b506105176111ca565b60405161048c9190614b7a565b34801561053057600080fd5b506104f561053f3660046147c9565b61125c565b34801561055057600080fd5b5061045861055f36600461467c565b61129f565b34801561057057600080fd5b5061045861057f3660046147c9565b611337565b34801561059057600080fd5b5061045861059f36600461475a565b6114f2565b3480156105b057600080fd5b506105b9611675565b60405161048c9190614b46565b3480156105d257600080fd5b506104586105e136600461475a565b61167b565b3480156105f257600080fd5b506104f561172c565b34801561060757600080fd5b5061045861061636600461458b565b61173b565b34801561062757600080fd5b506105b96106363660046147c9565b611773565b34801561064757600080fd5b506105b96106563660046147c9565b611785565b34801561066757600080fd5b506104586106763660046147c9565b61179a565b34801561068757600080fd5b5061069b610696366004614805565b6117f9565b60405161048c929190614a8b565b3480156106b557600080fd5b506104586106c43660046147e1565b611857565b3480156106d557600080fd5b506105b96106e436600461467c565b61187b565b3480156106f557600080fd5b506104586107043660046147e1565b6118d0565b34801561071557600080fd5b506107296107243660046147c9565b611912565b60405161048c929190614b36565b34801561074357600080fd5b5061045861196f565b61045861075a3660046147c9565b6119c1565b34801561076b57600080fd5b5061045861077a36600461458b565b6119fb565b34801561078b57600080fd5b5061045861079a3660046147c9565b611a16565b3480156107ab57600080fd5b506104586107ba3660046147c9565b611a46565b3480156107cb57600080fd5b506104586107da3660046147c9565b611ac4565b3480156107eb57600080fd5b5061047f6107fa3660046147c9565b611b23565b34801561080b57600080fd5b506105b961081a3660046147c9565b611b37565b34801561082b57600080fd5b5061045861083a36600461485e565b611b92565b61045861084d366004614805565b611bf4565b34801561085e57600080fd5b5061045861086d36600461485e565b611c07565b34801561087e57600080fd5b506105b9611c74565b34801561089357600080fd5b5061047f611c7a565b3480156108a857600080fd5b506104586108b73660046147c9565b611c83565b3480156108c857600080fd5b506104f56108d73660046147c9565b611ce2565b3480156108e857600080fd5b506104586108f73660046148bc565b611d17565b34801561090857600080fd5b506105b96109173660046147c9565b611de9565b34801561092857600080fd5b50610458610937366004614537565b611dfb565b34801561094857600080fd5b50610517611e13565b34801561095d57600080fd5b5061045861096c3660046147c9565b611e22565b34801561097d57600080fd5b506105b961098c366004614537565b611e81565b34801561099d57600080fd5b506105b9611ec5565b3480156109b257600080fd5b50610458611ecb565b3480156109c757600080fd5b506104f56109d6366004614805565b611f1b565b3480156109e757600080fd5b506105b9611f3a565b3480156109fc57600080fd5b5061047f610a0b3660046147e1565b611f5e565b348015610a1c57600080fd5b50610458610a2b3660046146a7565b611f87565b348015610a3c57600080fd5b5061051761208e565b610458610a533660046147c9565b61209d565b348015610a6457600080fd5b50610458610a733660046147c9565b612116565b348015610a8457600080fd5b50610458610a93366004614537565b612175565b348015610aa457600080fd5b5061047f610ab3366004614537565b612211565b610458610ac63660046147c9565b61226e565b348015610ad757600080fd5b506105b961227a565b348015610aec57600080fd5b50610458610afb366004614648565b61227f565b348015610b0c57600080fd5b506105b9612291565b348015610b2157600080fd5b5061047f610b30366004614537565b612297565b348015610b4157600080fd5b50610458610b50366004614648565b6122ac565b348015610b6157600080fd5b50610458610b703660046145cb565b612301565b610458612340565b348015610b8957600080fd5b50610517610b983660046147c9565b6123c1565b348015610ba957600080fd5b506105b9610bb83660046147c9565b612444565b348015610bc957600080fd5b5061047f610bd8366004614537565b61245b565b348015610be957600080fd5b506105b9612470565b348015610bfe57600080fd5b506105b9610c0d3660046147c9565b612476565b610458612495565b348015610c2657600080fd5b506105b96124c3565b348015610c3b57600080fd5b50610458610c4a3660046147e1565b6124e7565b348015610c5b57600080fd5b506105b9612506565b348015610c7057600080fd5b506105b961250c565b348015610c8557600080fd5b5061047f610c94366004614553565b612530565b348015610ca557600080fd5b506105b961255e565b348015610cba57600080fd5b506105b9612564565b348015610ccf57600080fd5b5061051761256a565b348015610ce457600080fd5b506105b96125f8565b6002600f541415610d195760405162461bcd60e51b8152600401610d109061571b565b60405180910390fd5b6002600f55601d54610d2b600d612712565b10610d485760405162461bcd60e51b8152600401610d1090614e76565b610d52600d612716565b6000610d5e600d612712565b60008181526015602052604090205490915015610d9557600081815260156020908152604080832054601490925290912055610db7565b610da7610da26013612604565b61271f565b6000828152601460205260409020555b6012546022546040516000926001600160a01b03169190610dd7906149c2565b60006040518083038185875af1925050503d8060008114610e14576040519150601f19603f3d011682016040523d82523d6000602084013e610e19565b606091505b5050905080610e3a5760405162461bcd60e51b8152600401610d109061509e565b6000610e51602254346127dd90919063ffffffff16565b90508015610ede576000610e636127e9565b6001600160a01b031682604051610e79906149c2565b60006040518083038185875af1925050503d8060008114610eb6576040519150601f19603f3d011682016040523d82523d6000602084013e610ebb565b606091505b5050905080610edc5760405162461bcd60e51b8152600401610d1090614c72565b505b610eef610ee96127e9565b846127ed565b601254610f279084906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006128cc565b827f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da6014600086815260200190815260200160002054604051610f6a9190614b46565b60405180910390a26000838152601460205260408082205460225491518693600080516020615b5283398151915293610fa69391928390614b4f565b60405180910390a250506001600f5550565b6000610fc38261294e565b90505b919050565b6012546001600160a01b03163314610ff55760405162461bcd60e51b8152600401610d1090614f1f565b600081116110155760405162461bcd60e51b8152600401610d1090615361565b60258190556040517fdac8da64ae2b74452cc3a429e0ae69eeb068ad94cf40e67469684441ce0d1fd49061104a908390614b46565b60405180910390a150565b6012546001600160a01b0316331461107f5760405162461bcd60e51b8152600401610d1090614f1f565b60008151116110a05760405162461bcd60e51b8152600401610d1090615800565b60005b81518110156111705760006001600160a01b03168282815181106110d757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156111065760405162461bcd60e51b8152600401610d1090615078565b60016026600084848151811061112c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061116881615ab5565b9150506110a3565b507fe8ee08290b54dc52b28697827b75f6f02c6211b60e3ce33e52e505b716bfee0e8160405161104a9190614aa4565b602781815481106111b057600080fd5b6000918252602090912001546001600160a01b0316905081565b6060600280546111d990615a80565b80601f016020809104026020016040519081016040528092919081815260200182805461120590615a80565b80156112525780601f1061122757610100808354040283529160200191611252565b820191906000526020600020905b81548152906001019060200180831161123557829003601f168201915b5050505050905090565b60006112678261297f565b6112835760405162461bcd60e51b8152600401610d1090615398565b506000908152600660205260409020546001600160a01b031690565b60006112aa82611ce2565b9050806001600160a01b0316836001600160a01b031614156112de5760405162461bcd60e51b8152600401610d10906155a6565b806001600160a01b03166112f06127e9565b6001600160a01b0316148061130c575061130c81610c946127e9565b6113285760405162461bcd60e51b8152600401610d10906151ce565b611332838361299c565b505050565b6012546001600160a01b031633146113615760405162461bcd60e51b8152600401610d1090614f1f565b601d5461137882611372600d612712565b90612a0a565b11156113965760405162461bcd60e51b8152600401610d1090614e76565b60005b818110156114ee576113ab600d612716565b60006113b7600d612712565b600081815260156020526040902054909150156113ee5760008181526015602090815260408083205460149092529091205561140b565b6113fb610da26013612604565b6000828152601460205260409020555b61141c6114166127e9565b826127ed565b6012546114549082906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006128cc565b807f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da60146000848152602001908152602001600020546040516114979190614b46565b60405180910390a26000818152601460205260408082205460225491518493600080516020615b52833981519152936114d39391928390614b4f565b60405180910390a250806114e681615ab5565b915050611399565b5050565b6012546001600160a01b0316331461151c5760405162461bcd60e51b8152600401610d1090614f1f565b600a811461153c5760405162461bcd60e51b8152600401610d109061522b565b60005b818110156116375782828281811061156757634e487b7160e01b600052603260045260246000fd5b905060200201356000141561158e5760405162461bcd60e51b8152600401610d10906153e4565b60006001601d5461159f9190615a26565b6115a96013612604565b6115b39190615ad0565b6115be9060016158c7565b600081815260156020526040902054909150156115e857816115df81615a69565b92505050611625565b83838381811061160857634e487b7160e01b600052603260045260246000fd5b600093845260156020908152604090942093029190910135909155505b8061162f81615ab5565b91505061153f565b507f155b8a5571e93a4742453f54ef0bb86e4a72e65188de51506a847135179cd06a8282604051611669929190614af1565b60405180910390a15050565b600a5490565b6012546001600160a01b031633146116a55760405162461bcd60e51b8152600401610d1090614f1f565b600781146116c55760405162461bcd60e51b8152600401610d1090614dbe565b60005b81811015611332578282828181106116f057634e487b7160e01b600052603260045260246000fd5b905060200201356016826007811061171857634e487b7160e01b600052603260045260246000fd5b01558061172481615ab5565b9150506116c8565b6012546001600160a01b031681565b61174c6117466127e9565b82612a16565b6117685760405162461bcd60e51b8152600401610d10906155e7565b611332838383612a9b565b6000908152601f602052604090205490565b60009081526020819052604090206001015490565b6012546001600160a01b031633146117c45760405162461bcd60e51b8152600401610d1090614f1f565b60288190556040517fb1d78271daba9a366098d40b64d642a1399cabaa22c5234bacc87e92cef82ae69061104a908390614b46565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b90910462ffffff169282018390529291612710906118439086615a07565b61184d91906158df565b9150509250929050565b61186082611785565b6118718161186c6127e9565b612bc8565b6113328383612c2c565b600061188683611e81565b82106118a45760405162461bcd60e51b8152600401610d1090614ce0565b506001600160a01b03821660009081526008602090815260408083208484529091529020545b92915050565b6118d86127e9565b6001600160a01b0316816001600160a01b0316146119085760405162461bcd60e51b8152600401610d109061584e565b6114ee8282612c4e565b60008061191e8361297f565b61193a5760405162461bcd60e51b8152600401610d10906150fb565b6000838152601560205260408120548190156119655750506000838152601560205260409020546001905b9092509050915091565b61199b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a0b6127e9565b6119b75760405162461bcd60e51b8152600401610d10906157a2565b6119bf612c70565b565b6025546024546119d191906158c7565b42116119ef5760405162461bcd60e51b8152600401610d1090615472565b6119f881612cde565b50565b61133283838360405180602001604052806000815250612301565b611a216117466127e9565b611a3d5760405162461bcd60e51b8152600401610d1090615752565b6119f881612fee565b6012546001600160a01b03163314611a705760405162461bcd60e51b8152600401610d1090614f1f565b428111611a8f5760405162461bcd60e51b8152600401610d1090614d7d565b60248190556040517f67c618c962da025b281f861dea46f523e3ad294426ce2279b597c9aa1f1c4acb9061104a908390614b46565b6012546001600160a01b03163314611aee5760405162461bcd60e51b8152600401610d1090614f1f565b60228190556040517f0448a1038381144f1dc49d8958c6cb52a9fd820cc752824812f0f28c69377a339061104a908390614b46565b602080526000908152604090205460ff1681565b6000611b41611675565b8210611b5f5760405162461bcd60e51b8152600401610d1090615638565b600a8281548110611b8057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6012546001600160a01b03163314611bbc5760405162461bcd60e51b8152600401610d1090614f1f565b611bc581613095565b7f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68160405161104a9190614b7a565b6114ee8282611c0285612476565b6130a8565b6012546001600160a01b03163314611c315760405162461bcd60e51b8152600401610d1090614f1f565b8051611c4490601e9060208401906143e1565b507f4a826ca029d05af64e411551e15f7ee1e70af0b9bc43a31154ace86a863397b48160405161104a9190614b7a565b60255481565b600c5460ff1690565b6012546001600160a01b03163314611cad5760405162461bcd60e51b8152600401610d1090614f1f565b60238190556040517fa0e0113404674c6f545b966e8ec54db3066a6c720a0054f0bc4b0c900cfff2439061104a908390614b46565b6000818152600460205260408120546001600160a01b031680610fc35760405162461bcd60e51b8152600401610d10906152e3565b6002600f541415611d3a5760405162461bcd60e51b8152600401610d109061571b565b6002600f553360009081526021602052604090205460ff16611d6e5760405162461bcd60e51b8152600401610d1090614ee8565b60008481526014602081815260408084208054888255838052828620805460ff1916891515179055601f84529190942085905591905290548590600080516020615b52833981519152908390611dc384612476565b6001604051611dd59493929190614b4f565b60405180910390a250506001600f55505050565b60009081526014602052604090205490565b60405162461bcd60e51b8152600401610d1090614e3f565b6060611e1d6133ee565b905090565b6012546001600160a01b03163314611e4c5760405162461bcd60e51b8152600401610d1090614f1f565b601d8190556040517f28a10a2e0b5582da7164754cb994f6214b8af6aa7f7e003305fbc09e7106c5139061104a908390614b46565b60006001600160a01b038216611ea95760405162461bcd60e51b8152600401610d1090615299565b506001600160a01b031660009081526005602052604090205490565b60245481565b611ef77f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a0b6127e9565b611f135760405162461bcd60e51b8152600401610d1090614f56565b6119bf6133fd565b6000828152600160205260408120611f339083613458565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6012546001600160a01b03163314611fb15760405162461bcd60e51b8152600401610d1090614f1f565b6000815111611fd25760405162461bcd60e51b8152600401610d1090615800565b60005b815181101561204a5760006001600160a01b031682828151811061200957634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156120385760405162461bcd60e51b8152600401610d1090615078565b8061204281615ab5565b915050611fd5565b50805161205e906027906020840190614465565b507f4d0162c9c6de79cec799a408451d445bc03afd96f495b6f389e964926f43c8698160405161104a9190614aa4565b6060600380546111d990615a80565b602454421180156120bc57506025546024546120b991906158c7565b42105b6120d85760405162461bcd60e51b8152600401610d1090615147565b3360009081526026602052604090205460ff16806120fa57506120fa33613464565b6119ef5760405162461bcd60e51b8152600401610d10906156e6565b6012546001600160a01b031633146121405760405162461bcd60e51b8152600401610d1090614f1f565b60298190556040517fff4da8d01e7184cc8c9d6c57d64b336b1de6d676b6215408967bd071c8da7e3d9061104a908390614b46565b6012546001600160a01b0316331461219f5760405162461bcd60e51b8152600401610d1090614f1f565b806001600160a01b0381166121c65760405162461bcd60e51b8152600401610d1090615541565b601280546001600160a01b0319166001600160a01b0384161790556040517fb5f93c8ed7df84870256f07ba228e09a30a9b6385a7737fe93d8cbb87e7dc77090611669908490614a3a565b6000816001600160a01b03811661223a5760405162461bcd60e51b8152600401610d1090615541565b6001600160a01b03831660009081526026602052604090205460ff1680612265575061226583613464565b91505b50919050565b6119f881602954613549565b600081565b6114ee61228a6127e9565b8383613735565b60235481565b60266020526000908152604090205460ff1681565b6012546001600160a01b031633146122d65760405162461bcd60e51b8152600401610d1090614f1f565b6001600160a01b03919091166000908152602160205260409020805460ff1916911515919091179055565b61231261230c6127e9565b83612a16565b61232e5760405162461bcd60e51b8152600401610d10906155e7565b61233a848484846137d8565b50505050565b6024544211801561235f575060255460245461235c91906158c7565b42105b61237b5760405162461bcd60e51b8152600401610d1090615147565b3360009081526026602052604090205460ff168061239d575061239d33613464565b6123b95760405162461bcd60e51b8152600401610d10906156e6565b6119bf610ced565b60606123cc8261297f565b6123e85760405162461bcd60e51b8152600401610d10906154f2565b60006123f26133ee565b905060008151116124125760405180602001604052806000815250612265565b8061241c8461380b565b60405160200161242d929190614993565b604051602081830303815290604052915050919050565b6000818152600160205260408120610fc390613926565b60216020526000908152604090205460ff1681565b60285481565b6000818152601f6020526040812054602854612265906001831b613931565b6025546024546124a591906158c7565b42116123b95760405162461bcd60e51b8152600401610d1090615472565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6124f082611785565b6124fc8161186c6127e9565b6113328383612c4e565b601d5481565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60225481565b60295481565b601e805461257790615a80565b80601f01602080910402602001604051908101604052809291908181526020018280546125a390615a80565b80156125f05780601f106125c5576101008083540402835291602001916125f0565b820191906000526020600020905b8154815290600101906020018083116125d357829003601f168201915b505050505081565b6000611e1d600d612712565b600033325a84544243804061261a606483615a26565b40604051602001612632989796959493929190614946565b604051602081830303815290604052805190602001206040516020016126589190614b46565b60408051808303601f190181529190528051602090910120918290555090565b6126828282611f5e565b6114ee576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556126b96127e9565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611f33836001600160a01b03841661393d565b5490565b80546001019055565b600060025b60078110156127d65761274383600061273e8460056158c7565b613987565b925060018111801561279757506016816007811061277157634e487b7160e01b600052603260045260246000fd5b0154606461277f6013612604565b6127899190615ad0565b6127949060016158c7565b11155b156127c4576127c18360646127ac6013612604565b6127b69190615ad0565b61273e8460056158c7565b92505b806127ce81615ab5565b915050612724565b5090919050565b6000611f338284615a26565b3390565b6001600160a01b0382166128135760405162461bcd60e51b8152600401610d109061532c565b61281c8161297f565b156128395760405162461bcd60e51b8152600401610d1090614e08565b61284560008383613a6a565b6001600160a01b038216600090815260056020526040812080546001929061286e9084906158c7565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6127108111156128ee5760405162461bcd60e51b8152600401610d1090614ca9565b6040805180820182526001600160a01b03938416815262ffffff928316602080830191825260009687526011905291909420935184549151909216600160a01b0262ffffff60a01b19929093166001600160a01b03199091161716179055565b600061295982613ab6565b80610fc35750506001600160e01b03191660009081526010602052604090205460ff1690565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129d182611ce2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f3382846158c7565b6000612a218261297f565b612a3d5760405162461bcd60e51b8152600401610d10906150fb565b6000612a4883611ce2565b9050806001600160a01b0316846001600160a01b03161480612a835750836001600160a01b0316612a788461125c565b6001600160a01b0316145b80612a935750612a938185612530565b949350505050565b826001600160a01b0316612aae82611ce2565b6001600160a01b031614612ad45760405162461bcd60e51b8152600401610d10906154a9565b6001600160a01b038216612afa5760405162461bcd60e51b8152600401610d1090614fb3565b612b05838383613a6a565b612b1060008261299c565b6001600160a01b0383166000908152600560205260408120805460019290612b39908490615a26565b90915550506001600160a01b0382166000908152600560205260408120805460019290612b679084906158c7565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612bd28282611f5e565b6114ee57612bea816001600160a01b03166014613ac1565b612bf5836020613ac1565b604051602001612c069291906149c5565b60408051601f198184030181529082905262461bcd60e51b8252610d1091600401614b7a565b612c368282612678565b600082815260016020526040902061133290826126fd565b612c588282613c73565b60008281526001602052604090206113329082613cf6565b612c78611c7a565b612c945760405162461bcd60e51b8152600401610d1090614c44565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612cc76127e9565b604051612cd49190614a3a565b60405180910390a1565b6002600f541415612d015760405162461bcd60e51b8152600401610d109061571b565b6002600f55602354811115612d285760405162461bcd60e51b8152600401610d109061502e565b601d54612d3982611372600d612712565b1115612d575760405162461bcd60e51b8152600401610d1090614e76565b6012546022546000916001600160a01b031690612d749084613931565b604051612d80906149c2565b60006040518083038185875af1925050503d8060008114612dbd576040519150601f19603f3d011682016040523d82523d6000602084013e612dc2565b606091505b5050905080612de35760405162461bcd60e51b8152600401610d109061509e565b6000612e04612dfd8460225461393190919063ffffffff16565b34906127dd565b90508015612e91576000612e166127e9565b6001600160a01b031682604051612e2c906149c2565b60006040518083038185875af1925050503d8060008114612e69576040519150601f19603f3d011682016040523d82523d6000602084013e612e6e565b606091505b5050905080612e8f5760405162461bcd60e51b8152600401610d1090614c72565b505b60005b83811015612fe357612ea6600d612716565b6000612eb2600d612712565b60008181526015602052604090205490915015612ee957600081815260156020908152604080832054601490925290912055612f06565b612ef6610da26013612604565b6000828152601460205260409020555b612f116114166127e9565b601254612f499082906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006128cc565b807f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da6014600084815260200190815260200160002054604051612f8c9190614b46565b60405180910390a26000818152601460205260408082205460225491518493600080516020615b5283398151915293612fc89391928390614b4f565b60405180910390a25080612fdb81615ab5565b915050612e94565b50506001600f555050565b6000612ff982611ce2565b905061300781600084613a6a565b61301260008361299c565b6001600160a01b038116600090815260056020526040812080546001929061303b908490615a26565b909155505060008281526004602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b80516114ee90600e9060208401906143e1565b6002600f5414156130cb5760405162461bcd60e51b8152600401610d109061571b565b6002600f55600083815260156020526040902054156130fc5760405162461bcd60e51b8152600401610d1090615262565b6000821161311c5760405162461bcd60e51b8152600401610d1090614c0d565b600782108061312b5750600b82115b6131475760405162461bcd60e51b8152600401610d10906156af565b61315083613d0b565b6012546040516000916001600160a01b031690839061316e906149c2565b60006040518083038185875af1925050503d80600081146131ab576040519150601f19603f3d011682016040523d82523d6000602084013e6131b0565b606091505b50509050806131d15760405162461bcd60e51b8152600401610d109061509e565b60006131dd34846127dd565b9050801561326a5760006131ef6127e9565b6001600160a01b031682604051613205906149c2565b60006040518083038185875af1925050503d8060008114613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b50509050806132685760405162461bcd60e51b8152600401610d1090614c72565b505b6000858152601460205260408120549060646132866013612604565b6132909190615ad0565b90506001861180156132a25750600786105b1561335557601686600781106132c857634e487b7160e01b600052603260045260246000fd5b015460646132d66013612604565b6132e09190615ad0565b6132eb9060016158c7565b1161331457613300828261273e8960056158c7565b600088815260146020526040902055613350565b61331f828288613987565b6000888152601460205260408120829055613340919061273e8960056158c7565b6000888152601460205260409020555b613370565b613360828288613987565b6000888152601460205260409020555b6000878152601f6020526040812080549161338a83615ab5565b9091555050600087815260208080526040808320805460ff191660019081179091556014909252918290205491518992600080516020615b52833981519152926133d8928792918b91614b4f565b60405180910390a250506001600f555050505050565b6060600e80546111d990615a80565b613405611c7a565b156134225760405162461bcd60e51b8152600401610d10906151a4565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cc76127e9565b6000611f338383613d81565b6000805b6027548110156135405760006027828154811061349557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81526001600160a01b03909116906370a08231906134ce908790600401614a3a565b60206040518083038186803b1580156134e657600080fd5b505afa1580156134fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061351e91906148a4565b111561352e576001915050610fc6565b8061353881615ab5565b915050613468565b50600092915050565b6002600f54141561356c5760405162461bcd60e51b8152600401610d109061571b565b6002600f556000828152601560205260409020541561359d5760405162461bcd60e51b8152600401610d1090615262565b6135a682613d0b565b6012546040516000916001600160a01b03169083906135c4906149c2565b60006040518083038185875af1925050503d8060008114613601576040519150601f19603f3d011682016040523d82523d6000602084013e613606565b606091505b50509050806136275760405162461bcd60e51b8152600401610d109061509e565b600061363334846127dd565b905080156136c05760006136456127e9565b6001600160a01b03168260405161365b906149c2565b60006040518083038185875af1925050503d8060008114613698576040519150601f19603f3d011682016040523d82523d6000602084013e61369d565b606091505b50509050806136be5760405162461bcd60e51b8152600401610d1090614c72565b505b6000848152601460205260409020546136dc610da26013612604565b6000868152601460208181526040808420948555601f825280842084905581805292839020805460ff19166001908117909155919052915490518792600080516020615b5283398151915292611dd59286928a91614b4f565b816001600160a01b0316836001600160a01b031614156137675760405162461bcd60e51b8152600401610d1090614ff7565b6001600160a01b0383811660008181526007602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906137cb908590614b2b565b60405180910390a3505050565b6137e3848484612a9b565b6137ef84848484613db9565b61233a5760405162461bcd60e51b8152600401610d1090614d2b565b60608161383057506040805180820190915260018152600360fc1b6020820152610fc6565b8160005b811561385a578061384481615ab5565b91506138539050600a836158df565b9150613834565b60008167ffffffffffffffff81111561388357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156138ad576020820181803683370190505b5090505b8415612a93576138c2600183615a26565b91506138cf600a86615ad0565b6138da9060306158c7565b60f81b8183815181106138fd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061391f600a866158df565b94506138b1565b6000610fc382612712565b6000611f338284615a07565b60006139498383613ed4565b61397f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556118ca565b5060006118ca565b6000602682106139a95760405162461bcd60e51b8152600401610d1090615684565b600082156139d4576139d16139bf846002615a07565b6139ca90600a615939565b8690613eec565b90505b6000613a2b6139e48560016158c7565b6139ef906002615a07565b6139fa90600a615939565b613a25613a088760016158c7565b613a13906002615a07565b613a1e90600a615939565b8990613ef8565b90613931565b90506000613a3a856002615a07565b613a4590600a615939565b613a4f9087615a07565b9050613a5f836113728484612a0a565b979650505050505050565b613a75838383613f04565b6000818152601460205260408082205490518392600080516020615b5283398151915292613aa99290918291600290614b4f565b60405180910390a2505050565b6000610fc382613f0f565b60606000613ad0836002615a07565b613adb9060026158c7565b67ffffffffffffffff811115613b0157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b2b576020820181803683370190505b509050600360fc1b81600081518110613b5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b9157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613bb5846002615a07565b613bc09060016158c7565b90505b6001811115613c54576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c0257634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c2657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613c4d81615a69565b9050613bc3565b508315611f335760405162461bcd60e51b8152600401610d1090614b8d565b613c7d8282611f5e565b156114ee576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055613cb26127e9565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611f33836001600160a01b038416613f34565b613d24613d166127e9565b6001600160a01b0316614051565b15613d415760405162461bcd60e51b8152600401610d109061556f565b32613d4a6127e9565b6001600160a01b031614613d705760405162461bcd60e51b8152600401610d1090614ea4565b6119f881613d7c6127e9565b614057565b6000826000018281548110613da657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000613dcd846001600160a01b0316614051565b15613ec957836001600160a01b031663150b7a02613de96127e9565b8786866040518563ffffffff1660e01b8152600401613e0b9493929190614a4e565b602060405180830381600087803b158015613e2557600080fd5b505af1925050508015613e55575060408051601f3d908101601f19168201909252613e5291810190614842565b60015b613eaf573d808015613e83576040519150601f19603f3d011682016040523d82523d6000602084013e613e88565b606091505b508051613ea75760405162461bcd60e51b8152600401610d1090614d2b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a93565b506001949350505050565b60009081526001919091016020526040902054151590565b6000611f338284615ad0565b6000611f3382846158df565b611332838383614090565b60006001600160e01b0319821663780e9d6360e01b1480610fc35750610fc3826140c0565b60008181526001830160205260408120548015614047576000613f58600183615a26565b8554909150600090613f6c90600190615a26565b9050818114613fed576000866000018281548110613f9a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613fcb57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061400c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506118ca565b60009150506118ca565b3b151590565b806001600160a01b031661406a83611ce2565b6001600160a01b0316146114ee5760405162461bcd60e51b8152600401610d1090615407565b61409b838383614100565b6140a3611c7a565b156113325760405162461bcd60e51b8152600401610d1090614bc2565b60006001600160e01b031982166380ac58cd60e01b14806140f157506001600160e01b03198216635b5e139f60e01b145b80610fc35750610fc382614189565b61410b838383611332565b6001600160a01b03831661412757614122816141ae565b61414a565b816001600160a01b0316836001600160a01b03161461414a5761414a83826141f2565b6001600160a01b038216614166576141618161428f565b611332565b826001600160a01b0316826001600160a01b031614611332576113328282614368565b60006001600160e01b03198216635a05180f60e01b1480610fc35750610fc3826143ac565b600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b600060016141ff84611e81565b6142099190615a26565b60008381526009602052604090205490915080821461425c576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906142a190600190615a26565b6000838152600b6020526040812054600a80549394509092849081106142d757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600a838154811061430657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061434c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061437383611e81565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b60006001600160e01b03198216637965db0b60e01b1480610fc357506301ffc9a760e01b6001600160e01b0319831614610fc3565b8280546143ed90615a80565b90600052602060002090601f01602090048101928261440f5760008555614455565b82601f1061442857805160ff1916838001178555614455565b82800160010185558215614455579182015b8281111561445557825182559160200191906001019061443a565b506144619291506144ba565b5090565b828054828255906000526020600020908101928215614455579160200282015b8281111561445557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614485565b5b8082111561446157600081556001016144bb565b600067ffffffffffffffff8311156144e9576144e9615b10565b6144fc601f8401601f191660200161589d565b905082815283838301111561451057600080fd5b828260208301376000602084830101529392505050565b80358015158114610fc657600080fd5b600060208284031215614548578081fd5b8135611f3381615b26565b60008060408385031215614565578081fd5b823561457081615b26565b9150602083013561458081615b26565b809150509250929050565b60008060006060848603121561459f578081fd5b83356145aa81615b26565b925060208401356145ba81615b26565b929592945050506040919091013590565b600080600080608085870312156145e0578081fd5b84356145eb81615b26565b935060208501356145fb81615b26565b925060408501359150606085013567ffffffffffffffff81111561461d578182fd5b8501601f8101871361462d578182fd5b61463c878235602084016144cf565b91505092959194509250565b6000806040838503121561465a578182fd5b823561466581615b26565b915061467360208401614527565b90509250929050565b6000806040838503121561468e578182fd5b823561469981615b26565b946020939093013593505050565b600060208083850312156146b9578182fd5b823567ffffffffffffffff808211156146d0578384fd5b818501915085601f8301126146e3578384fd5b8135818111156146f5576146f5615b10565b838102915061470584830161589d565b8181528481019084860184860187018a101561471f578788fd5b8795505b8386101561474d578035945061473885615b26565b84835260019590950194918601918601614723565b5098975050505050505050565b6000806020838503121561476c578182fd5b823567ffffffffffffffff80821115614783578384fd5b818501915085601f830112614796578384fd5b8135818111156147a4578485fd5b86602080830285010111156147b7578485fd5b60209290920196919550909350505050565b6000602082840312156147da578081fd5b5035919050565b600080604083850312156147f3578182fd5b82359150602083013561458081615b26565b60008060408385031215614817578182fd5b50508035926020909101359150565b600060208284031215614837578081fd5b8135611f3381615b3b565b600060208284031215614853578081fd5b8151611f3381615b3b565b60006020828403121561486f578081fd5b813567ffffffffffffffff811115614885578182fd5b8201601f81018413614895578182fd5b612a93848235602084016144cf565b6000602082840312156148b5578081fd5b5051919050565b600080600080608085870312156148d1578182fd5b84359350602085013592506148e860408601614527565b9396929550929360600135925050565b60008151808452614910816020860160208601615a3d565b601f01601f19169290920160200192915050565b6003811061494257634e487b7160e01b600052602160045260246000fd5b9052565b6bffffffffffffffffffffffff196060998a1b811682529790981b9096166014880152602887019490945260488601929092526068850152608884015260a883015260c882015260e80190565b600083516149a5818460208801615a3d565b8351908301906149b9818360208801615a3d565b01949350505050565b90565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516149fd816017850160208801615a3d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614a2e816028840160208801615a3d565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614a81908301846148f8565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015614ae55783516001600160a01b031683529284019291840191600101614ac0565b50909695505050505050565b6020808252810182905260006001600160fb1b03831115614b10578081fd5b60208302808560408501379190910160400190815292915050565b901515815260200190565b9115158252602082015260400190565b90815260200190565b848152602081018490526040810183905260808101614b716060830184614924565b95945050505050565b600060208252611f3360208301846148f8565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b6020808252601c908201527f4261736520636861726163746572206e6f74206d6f72706861626c6500000000604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526018908201527f4661696c656420746f2072657475726e206578636573732e0000000000000000604082015260600190565b6020808252601a908201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526021908201527f50726573616c653a207374617274206d75737420626520696e206675747572656040820152602160f81b606082015260800190565b6020808252602a908201527f456e7472696573206e756d6265722073686f756c64206d6174636820747261696040820152697473206e756d6265722160b01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526017908201527f53686f756c64206e6f74207573652074686973206f6e65000000000000000000604082015260600190565b602080825260149082015273151bdd185b081cdd5c1c1b1e481c995858da195960621b604082015260600190565b60208082526024908201527f4d73672073656e6465722073686f756c64206265206f726967696e616c206361604082015263363632b960e11b606082015260800190565b6020808252601a908201527f4e6f742063616c6c65642066726f6d207468652074756e6e656c000000000000604082015260600190565b60208082526017908201527f4e6f742063616c6c65642066726f6d207468652064616f000000000000000000604082015260600190565b6020808252603e908201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060408201527f6d75737420686176652070617573657220726f6c6520746f2070617573650000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602a908201527f43616e6e6f742062756c6b20627579206d6f7265207468616e20746865207072604082015269195cd95d081b1a5b5a5d60b21b606082015260800190565b6020808252600c908201526b4e756c6c206164647265737360a01b604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252603c908201527f43757272656e742074696d657374616d70206973206e6f7420696e207468652060408201527f626f756e6473206f66207468652070726573616c6520706572696f6400000000606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526018908201527f53686f756c6420626520313020626f73732067656e6573210000000000000000604082015260600190565b6020808252601c908201527f426f737320636861726163746572206e6f74206d6f72706861626c6500000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252601e908201527f50726573616c653a206e6f7420612076616c6964206475726174696f6e210000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600990820152684e756c6c2067656e6560b81b604082015260600190565b60208082526045908201527f5375626a6563745769746847656e654368616e6765723a2063616e6e6f74206360408201527f68616e67652067656e6f6d65206f6620746f6b656e2074686174206973206e6f6060820152643a1037bbb760d91b608082015260a00190565b60208082526018908201527f53616c6520706572696f64206e6f742073746172746564210000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601490820152734e6f7420612076616c696420616464726573732160601b604082015260600190565b6020808252601b908201527f43616c6c65722063616e6e6f74206265206120636f6e74726163740000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252601190820152702130b21033b2b732903837b9b4ba34b7b760791b604082015260600190565b60208082526019908201527f5261726520747261697473206e6f74206d6f72706861626c6500000000000000604082015260600190565b6020808252818101527f596f7520617265206e6f7420656c696769626c6520666f722070726573616c65604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b602080825260409082018190527f4552433732315072657365744d696e7465725061757365724175746f49643a20908201527f6d75737420686176652070617573657220726f6c6520746f20756e7061757365606082015260800190565b6020808252602e908201527f42656e65666963696172696573206172726179206c656e677468206d7573742060408201526d067726561746572207468616e20360941b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b60405181810167ffffffffffffffff811182821017156158bf576158bf615b10565b604052919050565b600082198211156158da576158da615ae4565b500190565b6000826158ee576158ee615afa565b500490565b80825b60018086116159055750615930565b81870482111561591757615917615ae4565b8086161561592457918102915b9490941c9380026158f6565b94509492505050565b6000611f33600019848460008261595257506001611f33565b8161595f57506000611f33565b8160018114615975576002811461597f576159ac565b6001915050611f33565b60ff84111561599057615990615ae4565b6001841b9150848211156159a6576159a6615ae4565b50611f33565b5060208310610133831016604e8410600b84101617156159df575081810a838111156159da576159da615ae4565b611f33565b6159ec84848460016158f3565b8086048211156159fe576159fe615ae4565b02949350505050565b6000816000190483118215151615615a2157615a21615ae4565b500290565b600082821015615a3857615a38615ae4565b500390565b60005b83811015615a58578181015183820152602001615a40565b8381111561233a5750506000910152565b600081615a7857615a78615ae4565b506000190190565b600281046001821680615a9457607f821691505b6020821081141561226857634e487b7160e01b600052602260045260246000fd5b6000600019821415615ac957615ac9615ae4565b5060010190565b600082615adf57615adf615afa565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146119f857600080fd5b6001600160e01b0319811681146119f857600080fdfe8c0bdd7bca83c4e0c810cbecf44bc544a9dc0b9f265664e31ce0ce85f07a052ba26469706673582212204eab96972838117cbd03a367cc25af7a7dfaf2ee9c0f0b2709dab24156ae797b64736f6c634300080000330000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000eeef2ae902343ff37f0d904fdaa599b08785e59000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000001a54686520436f6c646573742044726f703a205375626a6563747300000000000000000000000000000000000000000000000000000000000000000000000000085355424a45435453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d68747470733a2f2f75732d63656e7472616c312d7468652d636f6c646573742d64726f702e636c6f756466756e6374696f6e732e6e65742f657468657265756d2d6d657461646174613f69643d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061044b5760003560e01c80636a62784211610234578063a80dcfee1161012e578063d45d0622116100b6578063e985e9c51161007a578063e985e9c514610c79578063e9ecbe7414610c99578063ec9c074c14610cae578063f528a62714610cc3578063f84ddf0b14610cd85761045a565b8063d45d062214610c12578063d539139314610c1a578063d547741f14610c2f578063d5abeb0114610c4f578063e63ab1e914610c645761045a565b8063c87b56dd116100fd578063c87b56dd14610b7d578063ca15c87314610b9d578063cccb6d0d14610bbd578063ce14617d14610bdd578063d45351e514610bf25761045a565b8063a80dcfee14610b15578063ab39a3c814610b35578063b88d4fde14610b55578063c233a09314610b755761045a565b806394229ed0116101bc5780639a559e13116101805780639a559e1314610a985780639e7bb46714610ab8578063a217fddf14610acb578063a22cb46514610ae0578063a49bccca14610b005761045a565b806394229ed014610a1057806395d89b4114610a3057806398af666b14610a4557806398c5c07814610a585780639a3cac6a14610a785761045a565b806380a3a7831161020357806380a3a783146109915780638456cb59146109a65780639010d07c146109bb57806391192765146109db57806391d14854146109f05761045a565b80636a6278421461091c5780636c0360eb1461093c5780636f8b44b01461095157806370a08231146109715761045a565b806336568abe116103455780634f6ccce7116102cd5780635c975abb116102915780635c975abb146108875780635e468dfd1461089c5780636352211e146108bc5780636a1c03dc146108dc5780636a5be686146108fc5761045a565b80634f6ccce7146107ff57806355f804b31461081f57806356a5c9261461083f57806356b1b300146108525780635868c32a146108725761045a565b806342842e0e1161031457806342842e0e1461075f57806342966c681461077f57806342e0f7921461079f5780634438759e146107bf5780634df77416146107df5761045a565b806336568abe146106e957806339d6fd7b146107095780633f4ba83a14610737578063413859361461074c5761045a565b806318160ddd116103d3578063248a9ca311610397578063248a9ca31461063b578063289ea0a91461065b5780632a55205a1461067b5780632f2ff15d146106a95780632f745c59146106c95761045a565b806318160ddd146105a45780631ef4eb5c146105c65780632131c68c146105e657806323b872dd146105fb57806323c8d07a1461061b5761045a565b806306fdde031161041a57806306fdde0314610502578063081812fc14610524578063095ea7b3146105445780631342ff4c14610564578063162c8641146105845761045a565b806301ffc9a71461045f5780630259dae714610495578063032ff473146104b557806304a3e2e5146104d55761045a565b3661045a57610458610ced565b005b600080fd5b34801561046b57600080fd5b5061047f61047a366004614826565b610fb8565b60405161048c9190614b2b565b60405180910390f35b3480156104a157600080fd5b506104586104b03660046147c9565b610fcb565b3480156104c157600080fd5b506104586104d03660046146a7565b611055565b3480156104e157600080fd5b506104f56104f03660046147c9565b6111a0565b60405161048c9190614a3a565b34801561050e57600080fd5b506105176111ca565b60405161048c9190614b7a565b34801561053057600080fd5b506104f561053f3660046147c9565b61125c565b34801561055057600080fd5b5061045861055f36600461467c565b61129f565b34801561057057600080fd5b5061045861057f3660046147c9565b611337565b34801561059057600080fd5b5061045861059f36600461475a565b6114f2565b3480156105b057600080fd5b506105b9611675565b60405161048c9190614b46565b3480156105d257600080fd5b506104586105e136600461475a565b61167b565b3480156105f257600080fd5b506104f561172c565b34801561060757600080fd5b5061045861061636600461458b565b61173b565b34801561062757600080fd5b506105b96106363660046147c9565b611773565b34801561064757600080fd5b506105b96106563660046147c9565b611785565b34801561066757600080fd5b506104586106763660046147c9565b61179a565b34801561068757600080fd5b5061069b610696366004614805565b6117f9565b60405161048c929190614a8b565b3480156106b557600080fd5b506104586106c43660046147e1565b611857565b3480156106d557600080fd5b506105b96106e436600461467c565b61187b565b3480156106f557600080fd5b506104586107043660046147e1565b6118d0565b34801561071557600080fd5b506107296107243660046147c9565b611912565b60405161048c929190614b36565b34801561074357600080fd5b5061045861196f565b61045861075a3660046147c9565b6119c1565b34801561076b57600080fd5b5061045861077a36600461458b565b6119fb565b34801561078b57600080fd5b5061045861079a3660046147c9565b611a16565b3480156107ab57600080fd5b506104586107ba3660046147c9565b611a46565b3480156107cb57600080fd5b506104586107da3660046147c9565b611ac4565b3480156107eb57600080fd5b5061047f6107fa3660046147c9565b611b23565b34801561080b57600080fd5b506105b961081a3660046147c9565b611b37565b34801561082b57600080fd5b5061045861083a36600461485e565b611b92565b61045861084d366004614805565b611bf4565b34801561085e57600080fd5b5061045861086d36600461485e565b611c07565b34801561087e57600080fd5b506105b9611c74565b34801561089357600080fd5b5061047f611c7a565b3480156108a857600080fd5b506104586108b73660046147c9565b611c83565b3480156108c857600080fd5b506104f56108d73660046147c9565b611ce2565b3480156108e857600080fd5b506104586108f73660046148bc565b611d17565b34801561090857600080fd5b506105b96109173660046147c9565b611de9565b34801561092857600080fd5b50610458610937366004614537565b611dfb565b34801561094857600080fd5b50610517611e13565b34801561095d57600080fd5b5061045861096c3660046147c9565b611e22565b34801561097d57600080fd5b506105b961098c366004614537565b611e81565b34801561099d57600080fd5b506105b9611ec5565b3480156109b257600080fd5b50610458611ecb565b3480156109c757600080fd5b506104f56109d6366004614805565b611f1b565b3480156109e757600080fd5b506105b9611f3a565b3480156109fc57600080fd5b5061047f610a0b3660046147e1565b611f5e565b348015610a1c57600080fd5b50610458610a2b3660046146a7565b611f87565b348015610a3c57600080fd5b5061051761208e565b610458610a533660046147c9565b61209d565b348015610a6457600080fd5b50610458610a733660046147c9565b612116565b348015610a8457600080fd5b50610458610a93366004614537565b612175565b348015610aa457600080fd5b5061047f610ab3366004614537565b612211565b610458610ac63660046147c9565b61226e565b348015610ad757600080fd5b506105b961227a565b348015610aec57600080fd5b50610458610afb366004614648565b61227f565b348015610b0c57600080fd5b506105b9612291565b348015610b2157600080fd5b5061047f610b30366004614537565b612297565b348015610b4157600080fd5b50610458610b50366004614648565b6122ac565b348015610b6157600080fd5b50610458610b703660046145cb565b612301565b610458612340565b348015610b8957600080fd5b50610517610b983660046147c9565b6123c1565b348015610ba957600080fd5b506105b9610bb83660046147c9565b612444565b348015610bc957600080fd5b5061047f610bd8366004614537565b61245b565b348015610be957600080fd5b506105b9612470565b348015610bfe57600080fd5b506105b9610c0d3660046147c9565b612476565b610458612495565b348015610c2657600080fd5b506105b96124c3565b348015610c3b57600080fd5b50610458610c4a3660046147e1565b6124e7565b348015610c5b57600080fd5b506105b9612506565b348015610c7057600080fd5b506105b961250c565b348015610c8557600080fd5b5061047f610c94366004614553565b612530565b348015610ca557600080fd5b506105b961255e565b348015610cba57600080fd5b506105b9612564565b348015610ccf57600080fd5b5061051761256a565b348015610ce457600080fd5b506105b96125f8565b6002600f541415610d195760405162461bcd60e51b8152600401610d109061571b565b60405180910390fd5b6002600f55601d54610d2b600d612712565b10610d485760405162461bcd60e51b8152600401610d1090614e76565b610d52600d612716565b6000610d5e600d612712565b60008181526015602052604090205490915015610d9557600081815260156020908152604080832054601490925290912055610db7565b610da7610da26013612604565b61271f565b6000828152601460205260409020555b6012546022546040516000926001600160a01b03169190610dd7906149c2565b60006040518083038185875af1925050503d8060008114610e14576040519150601f19603f3d011682016040523d82523d6000602084013e610e19565b606091505b5050905080610e3a5760405162461bcd60e51b8152600401610d109061509e565b6000610e51602254346127dd90919063ffffffff16565b90508015610ede576000610e636127e9565b6001600160a01b031682604051610e79906149c2565b60006040518083038185875af1925050503d8060008114610eb6576040519150601f19603f3d011682016040523d82523d6000602084013e610ebb565b606091505b5050905080610edc5760405162461bcd60e51b8152600401610d1090614c72565b505b610eef610ee96127e9565b846127ed565b601254610f279084906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000001f46128cc565b827f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da6014600086815260200190815260200160002054604051610f6a9190614b46565b60405180910390a26000838152601460205260408082205460225491518693600080516020615b5283398151915293610fa69391928390614b4f565b60405180910390a250506001600f5550565b6000610fc38261294e565b90505b919050565b6012546001600160a01b03163314610ff55760405162461bcd60e51b8152600401610d1090614f1f565b600081116110155760405162461bcd60e51b8152600401610d1090615361565b60258190556040517fdac8da64ae2b74452cc3a429e0ae69eeb068ad94cf40e67469684441ce0d1fd49061104a908390614b46565b60405180910390a150565b6012546001600160a01b0316331461107f5760405162461bcd60e51b8152600401610d1090614f1f565b60008151116110a05760405162461bcd60e51b8152600401610d1090615800565b60005b81518110156111705760006001600160a01b03168282815181106110d757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156111065760405162461bcd60e51b8152600401610d1090615078565b60016026600084848151811061112c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061116881615ab5565b9150506110a3565b507fe8ee08290b54dc52b28697827b75f6f02c6211b60e3ce33e52e505b716bfee0e8160405161104a9190614aa4565b602781815481106111b057600080fd5b6000918252602090912001546001600160a01b0316905081565b6060600280546111d990615a80565b80601f016020809104026020016040519081016040528092919081815260200182805461120590615a80565b80156112525780601f1061122757610100808354040283529160200191611252565b820191906000526020600020905b81548152906001019060200180831161123557829003601f168201915b5050505050905090565b60006112678261297f565b6112835760405162461bcd60e51b8152600401610d1090615398565b506000908152600660205260409020546001600160a01b031690565b60006112aa82611ce2565b9050806001600160a01b0316836001600160a01b031614156112de5760405162461bcd60e51b8152600401610d10906155a6565b806001600160a01b03166112f06127e9565b6001600160a01b0316148061130c575061130c81610c946127e9565b6113285760405162461bcd60e51b8152600401610d10906151ce565b611332838361299c565b505050565b6012546001600160a01b031633146113615760405162461bcd60e51b8152600401610d1090614f1f565b601d5461137882611372600d612712565b90612a0a565b11156113965760405162461bcd60e51b8152600401610d1090614e76565b60005b818110156114ee576113ab600d612716565b60006113b7600d612712565b600081815260156020526040902054909150156113ee5760008181526015602090815260408083205460149092529091205561140b565b6113fb610da26013612604565b6000828152601460205260409020555b61141c6114166127e9565b826127ed565b6012546114549082906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000001f46128cc565b807f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da60146000848152602001908152602001600020546040516114979190614b46565b60405180910390a26000818152601460205260408082205460225491518493600080516020615b52833981519152936114d39391928390614b4f565b60405180910390a250806114e681615ab5565b915050611399565b5050565b6012546001600160a01b0316331461151c5760405162461bcd60e51b8152600401610d1090614f1f565b600a811461153c5760405162461bcd60e51b8152600401610d109061522b565b60005b818110156116375782828281811061156757634e487b7160e01b600052603260045260246000fd5b905060200201356000141561158e5760405162461bcd60e51b8152600401610d10906153e4565b60006001601d5461159f9190615a26565b6115a96013612604565b6115b39190615ad0565b6115be9060016158c7565b600081815260156020526040902054909150156115e857816115df81615a69565b92505050611625565b83838381811061160857634e487b7160e01b600052603260045260246000fd5b600093845260156020908152604090942093029190910135909155505b8061162f81615ab5565b91505061153f565b507f155b8a5571e93a4742453f54ef0bb86e4a72e65188de51506a847135179cd06a8282604051611669929190614af1565b60405180910390a15050565b600a5490565b6012546001600160a01b031633146116a55760405162461bcd60e51b8152600401610d1090614f1f565b600781146116c55760405162461bcd60e51b8152600401610d1090614dbe565b60005b81811015611332578282828181106116f057634e487b7160e01b600052603260045260246000fd5b905060200201356016826007811061171857634e487b7160e01b600052603260045260246000fd5b01558061172481615ab5565b9150506116c8565b6012546001600160a01b031681565b61174c6117466127e9565b82612a16565b6117685760405162461bcd60e51b8152600401610d10906155e7565b611332838383612a9b565b6000908152601f602052604090205490565b60009081526020819052604090206001015490565b6012546001600160a01b031633146117c45760405162461bcd60e51b8152600401610d1090614f1f565b60288190556040517fb1d78271daba9a366098d40b64d642a1399cabaa22c5234bacc87e92cef82ae69061104a908390614b46565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b90910462ffffff169282018390529291612710906118439086615a07565b61184d91906158df565b9150509250929050565b61186082611785565b6118718161186c6127e9565b612bc8565b6113328383612c2c565b600061188683611e81565b82106118a45760405162461bcd60e51b8152600401610d1090614ce0565b506001600160a01b03821660009081526008602090815260408083208484529091529020545b92915050565b6118d86127e9565b6001600160a01b0316816001600160a01b0316146119085760405162461bcd60e51b8152600401610d109061584e565b6114ee8282612c4e565b60008061191e8361297f565b61193a5760405162461bcd60e51b8152600401610d10906150fb565b6000838152601560205260408120548190156119655750506000838152601560205260409020546001905b9092509050915091565b61199b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a0b6127e9565b6119b75760405162461bcd60e51b8152600401610d10906157a2565b6119bf612c70565b565b6025546024546119d191906158c7565b42116119ef5760405162461bcd60e51b8152600401610d1090615472565b6119f881612cde565b50565b61133283838360405180602001604052806000815250612301565b611a216117466127e9565b611a3d5760405162461bcd60e51b8152600401610d1090615752565b6119f881612fee565b6012546001600160a01b03163314611a705760405162461bcd60e51b8152600401610d1090614f1f565b428111611a8f5760405162461bcd60e51b8152600401610d1090614d7d565b60248190556040517f67c618c962da025b281f861dea46f523e3ad294426ce2279b597c9aa1f1c4acb9061104a908390614b46565b6012546001600160a01b03163314611aee5760405162461bcd60e51b8152600401610d1090614f1f565b60228190556040517f0448a1038381144f1dc49d8958c6cb52a9fd820cc752824812f0f28c69377a339061104a908390614b46565b602080526000908152604090205460ff1681565b6000611b41611675565b8210611b5f5760405162461bcd60e51b8152600401610d1090615638565b600a8281548110611b8057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6012546001600160a01b03163314611bbc5760405162461bcd60e51b8152600401610d1090614f1f565b611bc581613095565b7f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68160405161104a9190614b7a565b6114ee8282611c0285612476565b6130a8565b6012546001600160a01b03163314611c315760405162461bcd60e51b8152600401610d1090614f1f565b8051611c4490601e9060208401906143e1565b507f4a826ca029d05af64e411551e15f7ee1e70af0b9bc43a31154ace86a863397b48160405161104a9190614b7a565b60255481565b600c5460ff1690565b6012546001600160a01b03163314611cad5760405162461bcd60e51b8152600401610d1090614f1f565b60238190556040517fa0e0113404674c6f545b966e8ec54db3066a6c720a0054f0bc4b0c900cfff2439061104a908390614b46565b6000818152600460205260408120546001600160a01b031680610fc35760405162461bcd60e51b8152600401610d10906152e3565b6002600f541415611d3a5760405162461bcd60e51b8152600401610d109061571b565b6002600f553360009081526021602052604090205460ff16611d6e5760405162461bcd60e51b8152600401610d1090614ee8565b60008481526014602081815260408084208054888255838052828620805460ff1916891515179055601f84529190942085905591905290548590600080516020615b52833981519152908390611dc384612476565b6001604051611dd59493929190614b4f565b60405180910390a250506001600f55505050565b60009081526014602052604090205490565b60405162461bcd60e51b8152600401610d1090614e3f565b6060611e1d6133ee565b905090565b6012546001600160a01b03163314611e4c5760405162461bcd60e51b8152600401610d1090614f1f565b601d8190556040517f28a10a2e0b5582da7164754cb994f6214b8af6aa7f7e003305fbc09e7106c5139061104a908390614b46565b60006001600160a01b038216611ea95760405162461bcd60e51b8152600401610d1090615299565b506001600160a01b031660009081526005602052604090205490565b60245481565b611ef77f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a0b6127e9565b611f135760405162461bcd60e51b8152600401610d1090614f56565b6119bf6133fd565b6000828152600160205260408120611f339083613458565b9392505050565b7f00000000000000000000000000000000000000000000000000000000000001f481565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6012546001600160a01b03163314611fb15760405162461bcd60e51b8152600401610d1090614f1f565b6000815111611fd25760405162461bcd60e51b8152600401610d1090615800565b60005b815181101561204a5760006001600160a01b031682828151811061200957634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614156120385760405162461bcd60e51b8152600401610d1090615078565b8061204281615ab5565b915050611fd5565b50805161205e906027906020840190614465565b507f4d0162c9c6de79cec799a408451d445bc03afd96f495b6f389e964926f43c8698160405161104a9190614aa4565b6060600380546111d990615a80565b602454421180156120bc57506025546024546120b991906158c7565b42105b6120d85760405162461bcd60e51b8152600401610d1090615147565b3360009081526026602052604090205460ff16806120fa57506120fa33613464565b6119ef5760405162461bcd60e51b8152600401610d10906156e6565b6012546001600160a01b031633146121405760405162461bcd60e51b8152600401610d1090614f1f565b60298190556040517fff4da8d01e7184cc8c9d6c57d64b336b1de6d676b6215408967bd071c8da7e3d9061104a908390614b46565b6012546001600160a01b0316331461219f5760405162461bcd60e51b8152600401610d1090614f1f565b806001600160a01b0381166121c65760405162461bcd60e51b8152600401610d1090615541565b601280546001600160a01b0319166001600160a01b0384161790556040517fb5f93c8ed7df84870256f07ba228e09a30a9b6385a7737fe93d8cbb87e7dc77090611669908490614a3a565b6000816001600160a01b03811661223a5760405162461bcd60e51b8152600401610d1090615541565b6001600160a01b03831660009081526026602052604090205460ff1680612265575061226583613464565b91505b50919050565b6119f881602954613549565b600081565b6114ee61228a6127e9565b8383613735565b60235481565b60266020526000908152604090205460ff1681565b6012546001600160a01b031633146122d65760405162461bcd60e51b8152600401610d1090614f1f565b6001600160a01b03919091166000908152602160205260409020805460ff1916911515919091179055565b61231261230c6127e9565b83612a16565b61232e5760405162461bcd60e51b8152600401610d10906155e7565b61233a848484846137d8565b50505050565b6024544211801561235f575060255460245461235c91906158c7565b42105b61237b5760405162461bcd60e51b8152600401610d1090615147565b3360009081526026602052604090205460ff168061239d575061239d33613464565b6123b95760405162461bcd60e51b8152600401610d10906156e6565b6119bf610ced565b60606123cc8261297f565b6123e85760405162461bcd60e51b8152600401610d10906154f2565b60006123f26133ee565b905060008151116124125760405180602001604052806000815250612265565b8061241c8461380b565b60405160200161242d929190614993565b604051602081830303815290604052915050919050565b6000818152600160205260408120610fc390613926565b60216020526000908152604090205460ff1681565b60285481565b6000818152601f6020526040812054602854612265906001831b613931565b6025546024546124a591906158c7565b42116123b95760405162461bcd60e51b8152600401610d1090615472565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6124f082611785565b6124fc8161186c6127e9565b6113328383612c4e565b601d5481565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b60225481565b60295481565b601e805461257790615a80565b80601f01602080910402602001604051908101604052809291908181526020018280546125a390615a80565b80156125f05780601f106125c5576101008083540402835291602001916125f0565b820191906000526020600020905b8154815290600101906020018083116125d357829003601f168201915b505050505081565b6000611e1d600d612712565b600033325a84544243804061261a606483615a26565b40604051602001612632989796959493929190614946565b604051602081830303815290604052805190602001206040516020016126589190614b46565b60408051808303601f190181529190528051602090910120918290555090565b6126828282611f5e565b6114ee576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556126b96127e9565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611f33836001600160a01b03841661393d565b5490565b80546001019055565b600060025b60078110156127d65761274383600061273e8460056158c7565b613987565b925060018111801561279757506016816007811061277157634e487b7160e01b600052603260045260246000fd5b0154606461277f6013612604565b6127899190615ad0565b6127949060016158c7565b11155b156127c4576127c18360646127ac6013612604565b6127b69190615ad0565b61273e8460056158c7565b92505b806127ce81615ab5565b915050612724565b5090919050565b6000611f338284615a26565b3390565b6001600160a01b0382166128135760405162461bcd60e51b8152600401610d109061532c565b61281c8161297f565b156128395760405162461bcd60e51b8152600401610d1090614e08565b61284560008383613a6a565b6001600160a01b038216600090815260056020526040812080546001929061286e9084906158c7565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6127108111156128ee5760405162461bcd60e51b8152600401610d1090614ca9565b6040805180820182526001600160a01b03938416815262ffffff928316602080830191825260009687526011905291909420935184549151909216600160a01b0262ffffff60a01b19929093166001600160a01b03199091161716179055565b600061295982613ab6565b80610fc35750506001600160e01b03191660009081526010602052604090205460ff1690565b6000908152600460205260409020546001600160a01b0316151590565b600081815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906129d182611ce2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000611f3382846158c7565b6000612a218261297f565b612a3d5760405162461bcd60e51b8152600401610d10906150fb565b6000612a4883611ce2565b9050806001600160a01b0316846001600160a01b03161480612a835750836001600160a01b0316612a788461125c565b6001600160a01b0316145b80612a935750612a938185612530565b949350505050565b826001600160a01b0316612aae82611ce2565b6001600160a01b031614612ad45760405162461bcd60e51b8152600401610d10906154a9565b6001600160a01b038216612afa5760405162461bcd60e51b8152600401610d1090614fb3565b612b05838383613a6a565b612b1060008261299c565b6001600160a01b0383166000908152600560205260408120805460019290612b39908490615a26565b90915550506001600160a01b0382166000908152600560205260408120805460019290612b679084906158c7565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612bd28282611f5e565b6114ee57612bea816001600160a01b03166014613ac1565b612bf5836020613ac1565b604051602001612c069291906149c5565b60408051601f198184030181529082905262461bcd60e51b8252610d1091600401614b7a565b612c368282612678565b600082815260016020526040902061133290826126fd565b612c588282613c73565b60008281526001602052604090206113329082613cf6565b612c78611c7a565b612c945760405162461bcd60e51b8152600401610d1090614c44565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612cc76127e9565b604051612cd49190614a3a565b60405180910390a1565b6002600f541415612d015760405162461bcd60e51b8152600401610d109061571b565b6002600f55602354811115612d285760405162461bcd60e51b8152600401610d109061502e565b601d54612d3982611372600d612712565b1115612d575760405162461bcd60e51b8152600401610d1090614e76565b6012546022546000916001600160a01b031690612d749084613931565b604051612d80906149c2565b60006040518083038185875af1925050503d8060008114612dbd576040519150601f19603f3d011682016040523d82523d6000602084013e612dc2565b606091505b5050905080612de35760405162461bcd60e51b8152600401610d109061509e565b6000612e04612dfd8460225461393190919063ffffffff16565b34906127dd565b90508015612e91576000612e166127e9565b6001600160a01b031682604051612e2c906149c2565b60006040518083038185875af1925050503d8060008114612e69576040519150601f19603f3d011682016040523d82523d6000602084013e612e6e565b606091505b5050905080612e8f5760405162461bcd60e51b8152600401610d1090614c72565b505b60005b83811015612fe357612ea6600d612716565b6000612eb2600d612712565b60008181526015602052604090205490915015612ee957600081815260156020908152604080832054601490925290912055612f06565b612ef6610da26013612604565b6000828152601460205260409020555b612f116114166127e9565b601254612f499082906001600160a01b03167f00000000000000000000000000000000000000000000000000000000000001f46128cc565b807f5f7666687319b40936f33c188908d86aea154abd3f4127b4fa0a3f04f303c7da6014600084815260200190815260200160002054604051612f8c9190614b46565b60405180910390a26000818152601460205260408082205460225491518493600080516020615b5283398151915293612fc89391928390614b4f565b60405180910390a25080612fdb81615ab5565b915050612e94565b50506001600f555050565b6000612ff982611ce2565b905061300781600084613a6a565b61301260008361299c565b6001600160a01b038116600090815260056020526040812080546001929061303b908490615a26565b909155505060008281526004602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b80516114ee90600e9060208401906143e1565b6002600f5414156130cb5760405162461bcd60e51b8152600401610d109061571b565b6002600f55600083815260156020526040902054156130fc5760405162461bcd60e51b8152600401610d1090615262565b6000821161311c5760405162461bcd60e51b8152600401610d1090614c0d565b600782108061312b5750600b82115b6131475760405162461bcd60e51b8152600401610d10906156af565b61315083613d0b565b6012546040516000916001600160a01b031690839061316e906149c2565b60006040518083038185875af1925050503d80600081146131ab576040519150601f19603f3d011682016040523d82523d6000602084013e6131b0565b606091505b50509050806131d15760405162461bcd60e51b8152600401610d109061509e565b60006131dd34846127dd565b9050801561326a5760006131ef6127e9565b6001600160a01b031682604051613205906149c2565b60006040518083038185875af1925050503d8060008114613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b50509050806132685760405162461bcd60e51b8152600401610d1090614c72565b505b6000858152601460205260408120549060646132866013612604565b6132909190615ad0565b90506001861180156132a25750600786105b1561335557601686600781106132c857634e487b7160e01b600052603260045260246000fd5b015460646132d66013612604565b6132e09190615ad0565b6132eb9060016158c7565b1161331457613300828261273e8960056158c7565b600088815260146020526040902055613350565b61331f828288613987565b6000888152601460205260408120829055613340919061273e8960056158c7565b6000888152601460205260409020555b613370565b613360828288613987565b6000888152601460205260409020555b6000878152601f6020526040812080549161338a83615ab5565b9091555050600087815260208080526040808320805460ff191660019081179091556014909252918290205491518992600080516020615b52833981519152926133d8928792918b91614b4f565b60405180910390a250506001600f555050505050565b6060600e80546111d990615a80565b613405611c7a565b156134225760405162461bcd60e51b8152600401610d10906151a4565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612cc76127e9565b6000611f338383613d81565b6000805b6027548110156135405760006027828154811061349557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546040516370a0823160e01b81526001600160a01b03909116906370a08231906134ce908790600401614a3a565b60206040518083038186803b1580156134e657600080fd5b505afa1580156134fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061351e91906148a4565b111561352e576001915050610fc6565b8061353881615ab5565b915050613468565b50600092915050565b6002600f54141561356c5760405162461bcd60e51b8152600401610d109061571b565b6002600f556000828152601560205260409020541561359d5760405162461bcd60e51b8152600401610d1090615262565b6135a682613d0b565b6012546040516000916001600160a01b03169083906135c4906149c2565b60006040518083038185875af1925050503d8060008114613601576040519150601f19603f3d011682016040523d82523d6000602084013e613606565b606091505b50509050806136275760405162461bcd60e51b8152600401610d109061509e565b600061363334846127dd565b905080156136c05760006136456127e9565b6001600160a01b03168260405161365b906149c2565b60006040518083038185875af1925050503d8060008114613698576040519150601f19603f3d011682016040523d82523d6000602084013e61369d565b606091505b50509050806136be5760405162461bcd60e51b8152600401610d1090614c72565b505b6000848152601460205260409020546136dc610da26013612604565b6000868152601460208181526040808420948555601f825280842084905581805292839020805460ff19166001908117909155919052915490518792600080516020615b5283398151915292611dd59286928a91614b4f565b816001600160a01b0316836001600160a01b031614156137675760405162461bcd60e51b8152600401610d1090614ff7565b6001600160a01b0383811660008181526007602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906137cb908590614b2b565b60405180910390a3505050565b6137e3848484612a9b565b6137ef84848484613db9565b61233a5760405162461bcd60e51b8152600401610d1090614d2b565b60608161383057506040805180820190915260018152600360fc1b6020820152610fc6565b8160005b811561385a578061384481615ab5565b91506138539050600a836158df565b9150613834565b60008167ffffffffffffffff81111561388357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156138ad576020820181803683370190505b5090505b8415612a93576138c2600183615a26565b91506138cf600a86615ad0565b6138da9060306158c7565b60f81b8183815181106138fd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061391f600a866158df565b94506138b1565b6000610fc382612712565b6000611f338284615a07565b60006139498383613ed4565b61397f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556118ca565b5060006118ca565b6000602682106139a95760405162461bcd60e51b8152600401610d1090615684565b600082156139d4576139d16139bf846002615a07565b6139ca90600a615939565b8690613eec565b90505b6000613a2b6139e48560016158c7565b6139ef906002615a07565b6139fa90600a615939565b613a25613a088760016158c7565b613a13906002615a07565b613a1e90600a615939565b8990613ef8565b90613931565b90506000613a3a856002615a07565b613a4590600a615939565b613a4f9087615a07565b9050613a5f836113728484612a0a565b979650505050505050565b613a75838383613f04565b6000818152601460205260408082205490518392600080516020615b5283398151915292613aa99290918291600290614b4f565b60405180910390a2505050565b6000610fc382613f0f565b60606000613ad0836002615a07565b613adb9060026158c7565b67ffffffffffffffff811115613b0157634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613b2b576020820181803683370190505b509050600360fc1b81600081518110613b5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b9157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000613bb5846002615a07565b613bc09060016158c7565b90505b6001811115613c54576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613c0257634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110613c2657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93613c4d81615a69565b9050613bc3565b508315611f335760405162461bcd60e51b8152600401610d1090614b8d565b613c7d8282611f5e565b156114ee576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055613cb26127e9565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611f33836001600160a01b038416613f34565b613d24613d166127e9565b6001600160a01b0316614051565b15613d415760405162461bcd60e51b8152600401610d109061556f565b32613d4a6127e9565b6001600160a01b031614613d705760405162461bcd60e51b8152600401610d1090614ea4565b6119f881613d7c6127e9565b614057565b6000826000018281548110613da657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000613dcd846001600160a01b0316614051565b15613ec957836001600160a01b031663150b7a02613de96127e9565b8786866040518563ffffffff1660e01b8152600401613e0b9493929190614a4e565b602060405180830381600087803b158015613e2557600080fd5b505af1925050508015613e55575060408051601f3d908101601f19168201909252613e5291810190614842565b60015b613eaf573d808015613e83576040519150601f19603f3d011682016040523d82523d6000602084013e613e88565b606091505b508051613ea75760405162461bcd60e51b8152600401610d1090614d2b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612a93565b506001949350505050565b60009081526001919091016020526040902054151590565b6000611f338284615ad0565b6000611f3382846158df565b611332838383614090565b60006001600160e01b0319821663780e9d6360e01b1480610fc35750610fc3826140c0565b60008181526001830160205260408120548015614047576000613f58600183615a26565b8554909150600090613f6c90600190615a26565b9050818114613fed576000866000018281548110613f9a57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613fcb57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061400c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506118ca565b60009150506118ca565b3b151590565b806001600160a01b031661406a83611ce2565b6001600160a01b0316146114ee5760405162461bcd60e51b8152600401610d1090615407565b61409b838383614100565b6140a3611c7a565b156113325760405162461bcd60e51b8152600401610d1090614bc2565b60006001600160e01b031982166380ac58cd60e01b14806140f157506001600160e01b03198216635b5e139f60e01b145b80610fc35750610fc382614189565b61410b838383611332565b6001600160a01b03831661412757614122816141ae565b61414a565b816001600160a01b0316836001600160a01b03161461414a5761414a83826141f2565b6001600160a01b038216614166576141618161428f565b611332565b826001600160a01b0316826001600160a01b031614611332576113328282614368565b60006001600160e01b03198216635a05180f60e01b1480610fc35750610fc3826143ac565b600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b600060016141ff84611e81565b6142099190615a26565b60008381526009602052604090205490915080821461425c576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906142a190600190615a26565b6000838152600b6020526040812054600a80549394509092849081106142d757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600a838154811061430657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061434c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061437383611e81565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b60006001600160e01b03198216637965db0b60e01b1480610fc357506301ffc9a760e01b6001600160e01b0319831614610fc3565b8280546143ed90615a80565b90600052602060002090601f01602090048101928261440f5760008555614455565b82601f1061442857805160ff1916838001178555614455565b82800160010185558215614455579182015b8281111561445557825182559160200191906001019061443a565b506144619291506144ba565b5090565b828054828255906000526020600020908101928215614455579160200282015b8281111561445557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614485565b5b8082111561446157600081556001016144bb565b600067ffffffffffffffff8311156144e9576144e9615b10565b6144fc601f8401601f191660200161589d565b905082815283838301111561451057600080fd5b828260208301376000602084830101529392505050565b80358015158114610fc657600080fd5b600060208284031215614548578081fd5b8135611f3381615b26565b60008060408385031215614565578081fd5b823561457081615b26565b9150602083013561458081615b26565b809150509250929050565b60008060006060848603121561459f578081fd5b83356145aa81615b26565b925060208401356145ba81615b26565b929592945050506040919091013590565b600080600080608085870312156145e0578081fd5b84356145eb81615b26565b935060208501356145fb81615b26565b925060408501359150606085013567ffffffffffffffff81111561461d578182fd5b8501601f8101871361462d578182fd5b61463c878235602084016144cf565b91505092959194509250565b6000806040838503121561465a578182fd5b823561466581615b26565b915061467360208401614527565b90509250929050565b6000806040838503121561468e578182fd5b823561469981615b26565b946020939093013593505050565b600060208083850312156146b9578182fd5b823567ffffffffffffffff808211156146d0578384fd5b818501915085601f8301126146e3578384fd5b8135818111156146f5576146f5615b10565b838102915061470584830161589d565b8181528481019084860184860187018a101561471f578788fd5b8795505b8386101561474d578035945061473885615b26565b84835260019590950194918601918601614723565b5098975050505050505050565b6000806020838503121561476c578182fd5b823567ffffffffffffffff80821115614783578384fd5b818501915085601f830112614796578384fd5b8135818111156147a4578485fd5b86602080830285010111156147b7578485fd5b60209290920196919550909350505050565b6000602082840312156147da578081fd5b5035919050565b600080604083850312156147f3578182fd5b82359150602083013561458081615b26565b60008060408385031215614817578182fd5b50508035926020909101359150565b600060208284031215614837578081fd5b8135611f3381615b3b565b600060208284031215614853578081fd5b8151611f3381615b3b565b60006020828403121561486f578081fd5b813567ffffffffffffffff811115614885578182fd5b8201601f81018413614895578182fd5b612a93848235602084016144cf565b6000602082840312156148b5578081fd5b5051919050565b600080600080608085870312156148d1578182fd5b84359350602085013592506148e860408601614527565b9396929550929360600135925050565b60008151808452614910816020860160208601615a3d565b601f01601f19169290920160200192915050565b6003811061494257634e487b7160e01b600052602160045260246000fd5b9052565b6bffffffffffffffffffffffff196060998a1b811682529790981b9096166014880152602887019490945260488601929092526068850152608884015260a883015260c882015260e80190565b600083516149a5818460208801615a3d565b8351908301906149b9818360208801615a3d565b01949350505050565b90565b60007f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000825283516149fd816017850160208801615a3d565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614a2e816028840160208801615a3d565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614a81908301846148f8565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015614ae55783516001600160a01b031683529284019291840191600101614ac0565b50909695505050505050565b6020808252810182905260006001600160fb1b03831115614b10578081fd5b60208302808560408501379190910160400190815292915050565b901515815260200190565b9115158252602082015260400190565b90815260200190565b848152602081018490526040810183905260808101614b716060830184614924565b95945050505050565b600060208252611f3360208301846148f8565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b6020808252601c908201527f4261736520636861726163746572206e6f74206d6f72706861626c6500000000604082015260600190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526018908201527f4661696c656420746f2072657475726e206578636573732e0000000000000000604082015260600190565b6020808252601a908201527f45524332393831526f79616c746965733a20546f6f2068696768000000000000604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526021908201527f50726573616c653a207374617274206d75737420626520696e206675747572656040820152602160f81b606082015260800190565b6020808252602a908201527f456e7472696573206e756d6265722073686f756c64206d6174636820747261696040820152697473206e756d6265722160b01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526017908201527f53686f756c64206e6f74207573652074686973206f6e65000000000000000000604082015260600190565b602080825260149082015273151bdd185b081cdd5c1c1b1e481c995858da195960621b604082015260600190565b60208082526024908201527f4d73672073656e6465722073686f756c64206265206f726967696e616c206361604082015263363632b960e11b606082015260800190565b6020808252601a908201527f4e6f742063616c6c65642066726f6d207468652074756e6e656c000000000000604082015260600190565b60208082526017908201527f4e6f742063616c6c65642066726f6d207468652064616f000000000000000000604082015260600190565b6020808252603e908201527f4552433732315072657365744d696e7465725061757365724175746f49643a2060408201527f6d75737420686176652070617573657220726f6c6520746f2070617573650000606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252602a908201527f43616e6e6f742062756c6b20627579206d6f7265207468616e20746865207072604082015269195cd95d081b1a5b5a5d60b21b606082015260800190565b6020808252600c908201526b4e756c6c206164647265737360a01b604082015260600190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252603c908201527f43757272656e742074696d657374616d70206973206e6f7420696e207468652060408201527f626f756e6473206f66207468652070726573616c6520706572696f6400000000606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526018908201527f53686f756c6420626520313020626f73732067656e6573210000000000000000604082015260600190565b6020808252601c908201527f426f737320636861726163746572206e6f74206d6f72706861626c6500000000604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252601e908201527f50726573616c653a206e6f7420612076616c6964206475726174696f6e210000604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600990820152684e756c6c2067656e6560b81b604082015260600190565b60208082526045908201527f5375626a6563745769746847656e654368616e6765723a2063616e6e6f74206360408201527f68616e67652067656e6f6d65206f6620746f6b656e2074686174206973206e6f6060820152643a1037bbb760d91b608082015260a00190565b60208082526018908201527f53616c6520706572696f64206e6f742073746172746564210000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b6020808252601490820152734e6f7420612076616c696420616464726573732160601b604082015260600190565b6020808252601b908201527f43616c6c65722063616e6e6f74206265206120636f6e74726163740000000000604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252601190820152702130b21033b2b732903837b9b4ba34b7b760791b604082015260600190565b60208082526019908201527f5261726520747261697473206e6f74206d6f72706861626c6500000000000000604082015260600190565b6020808252818101527f596f7520617265206e6f7420656c696769626c6520666f722070726573616c65604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b602080825260409082018190527f4552433732315072657365744d696e7465725061757365724175746f49643a20908201527f6d75737420686176652070617573657220726f6c6520746f20756e7061757365606082015260800190565b6020808252602e908201527f42656e65666963696172696573206172726179206c656e677468206d7573742060408201526d067726561746572207468616e20360941b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b60405181810167ffffffffffffffff811182821017156158bf576158bf615b10565b604052919050565b600082198211156158da576158da615ae4565b500190565b6000826158ee576158ee615afa565b500490565b80825b60018086116159055750615930565b81870482111561591757615917615ae4565b8086161561592457918102915b9490941c9380026158f6565b94509492505050565b6000611f33600019848460008261595257506001611f33565b8161595f57506000611f33565b8160018114615975576002811461597f576159ac565b6001915050611f33565b60ff84111561599057615990615ae4565b6001841b9150848211156159a6576159a6615ae4565b50611f33565b5060208310610133831016604e8410600b84101617156159df575081810a838111156159da576159da615ae4565b611f33565b6159ec84848460016158f3565b8086048211156159fe576159fe615ae4565b02949350505050565b6000816000190483118215151615615a2157615a21615ae4565b500290565b600082821015615a3857615a38615ae4565b500390565b60005b83811015615a58578181015183820152602001615a40565b8381111561233a5750506000910152565b600081615a7857615a78615ae4565b506000190190565b600281046001821680615a9457607f821691505b6020821081141561226857634e487b7160e01b600052602260045260246000fd5b6000600019821415615ac957615ac9615ae4565b5060010190565b600082615adf57615adf615afa565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146119f857600080fd5b6001600160e01b0319811681146119f857600080fdfe8c0bdd7bca83c4e0c810cbecf44bc544a9dc0b9f265664e31ce0ce85f07a052ba26469706673582212204eab96972838117cbd03a367cc25af7a7dfaf2ee9c0f0b2709dab24156ae797b64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000eeef2ae902343ff37f0d904fdaa599b08785e59000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000038d7ea4c68000000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000001a54686520436f6c646573742044726f703a205375626a6563747300000000000000000000000000000000000000000000000000000000000000000000000000085355424a45435453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d68747470733a2f2f75732d63656e7472616c312d7468652d636f6c646573742d64726f702e636c6f756466756e6374696f6e732e6e65742f657468657265756d2d6d657461646174613f69643d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): The Coldest Drop: Subjects
Arg [1] : symbol (string): SUBJECTS
Arg [2] : baseURI (string): https://us-central1-the-coldest-drop.cloudfunctions.net/ethereum-metadata?id=
Arg [3] : _daoAddress (address): 0x0eeeF2AE902343ff37f0d904fdaA599b08785e59
Arg [4] : _subjectPrice (uint256): 100000000000000000
Arg [5] : _maxSupply (uint256): 10000
Arg [6] : _bulkBuyLimit (uint256): 20
Arg [7] : _baseGenomeChangePrice (uint256): 1000000000000000
Arg [8] : _randomizeGenomePrice (uint256): 10000000000000000
Arg [9] : _arweaveAssetsJSON (string):
-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 0000000000000000000000000eeef2ae902343ff37f0d904fdaa599b08785e59
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [7] : 00000000000000000000000000000000000000000000000000038d7ea4c68000
Arg [8] : 000000000000000000000000000000000000000000000000002386f26fc10000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [10] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [11] : 54686520436f6c646573742044726f703a205375626a65637473000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [13] : 5355424a45435453000000000000000000000000000000000000000000000000
Arg [14] : 000000000000000000000000000000000000000000000000000000000000004d
Arg [15] : 68747470733a2f2f75732d63656e7472616c312d7468652d636f6c646573742d
Arg [16] : 64726f702e636c6f756466756e6374696f6e732e6e65742f657468657265756d
Arg [17] : 2d6d657461646174613f69643d00000000000000000000000000000000000000
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.