Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 478 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 19706815 | 215 days ago | IN | 0 ETH | 0.00029958 | ||||
Set Approval For... | 19573681 | 234 days ago | IN | 0 ETH | 0.00050525 | ||||
Set Approval For... | 19106214 | 299 days ago | IN | 0 ETH | 0.0005747 | ||||
Set Approval For... | 18835208 | 337 days ago | IN | 0 ETH | 0.00238464 | ||||
Set Approval For... | 18691517 | 357 days ago | IN | 0 ETH | 0.00171997 | ||||
Set Approval For... | 17269110 | 557 days ago | IN | 0 ETH | 0.00370576 | ||||
Set Approval For... | 16610065 | 650 days ago | IN | 0 ETH | 0.0009302 | ||||
Set Approval For... | 16296432 | 694 days ago | IN | 0 ETH | 0.00070146 | ||||
Set Approval For... | 15607462 | 790 days ago | IN | 0 ETH | 0.0003154 | ||||
Set Approval For... | 15607462 | 790 days ago | IN | 0 ETH | 0.00031483 | ||||
Set Approval For... | 15606484 | 790 days ago | IN | 0 ETH | 0.00019662 | ||||
Transfer From | 15415977 | 819 days ago | IN | 0 ETH | 0.00173462 | ||||
Set Approval For... | 15125802 | 865 days ago | IN | 0 ETH | 0.00033916 | ||||
Set Approval For... | 15074343 | 873 days ago | IN | 0 ETH | 0.00054092 | ||||
Set Approval For... | 14994525 | 887 days ago | IN | 0 ETH | 0.00079148 | ||||
Set Approval For... | 14981589 | 889 days ago | IN | 0 ETH | 0.00136281 | ||||
Set Approval For... | 14523889 | 963 days ago | IN | 0 ETH | 0.0040838 | ||||
Set Approval For... | 14523889 | 963 days ago | IN | 0 ETH | 0.0040838 | ||||
Release | 14428375 | 978 days ago | IN | 0 ETH | 0.00095799 | ||||
Release | 14428373 | 978 days ago | IN | 0 ETH | 0.00097451 | ||||
Release | 14428331 | 978 days ago | IN | 0 ETH | 0.00112299 | ||||
Set Approval For... | 14403566 | 982 days ago | IN | 0 ETH | 0.00107819 | ||||
Set Approval For... | 14294389 | 998 days ago | IN | 0 ETH | 0.00079997 | ||||
Set Approval For... | 14222131 | 1010 days ago | IN | 0 ETH | 0.00264836 | ||||
Set Approval For... | 14221058 | 1010 days ago | IN | 0 ETH | 0.00261269 |
Latest 4 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14428375 | 978 days ago | 1.938 ETH | ||||
14428373 | 978 days ago | 3.876 ETH | ||||
14428331 | 978 days ago | 3.876 ETH | ||||
12398883 | 1294 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
Mars
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import './Mars26.sol'; import './MarsStorage.sol'; /** * @title Mars contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract Mars is Ownable, ERC721Enumerable, PaymentSplitter { using SafeMath for uint256; uint256 public constant MAX_SUPPLY = 16200; uint256 public constant RESERVED_SUPPLY = 1305 + 500; bytes32 private _provenanceHash; uint256 private _nameChangePrice; uint256 private _saleStartTimestamp; uint256 private _revealTimestamp; uint256 private _startingIndexBlock; uint256 internal _startingIndex; uint256 private _numSoldTokens; uint256 private _numMintedReservedTokens; mapping (uint256 => string) private _tokenNames; mapping (string => bool) private _reservedNames; mapping (uint256 => bool) private _mintedBeforeReveal; Mars26 private _m26; MarsStorage private _storage; event NameChange (uint256 indexed maskIndex, string newName); /** * @dev Sets immutable values of contract. */ constructor ( bytes32 provenanceHash_, address m26Address_, uint256 nameChangePrice_, uint256 saleStartTimestamp_, uint256 revealTimestamp_, address[] memory payees, uint256[] memory shares_ ) ERC721("Mars", "MARS") PaymentSplitter(payees, shares_) { _provenanceHash = provenanceHash_; _m26 = Mars26(m26Address_); _nameChangePrice = nameChangePrice_; _saleStartTimestamp = saleStartTimestamp_; _revealTimestamp = revealTimestamp_; _storage = new MarsStorage(MAX_SUPPLY); } /** * @dev Returns provenance hash digest set during initialization of contract. * * The provenance hash is derived by concatenating all existing IPFS CIDs (v0) * of the Mars NFTs and hashing the concatenated string using SHA2-256. * Note that the CIDs were concatenated and hashed in their base58 representation. */ function provenanceHash() public view returns (bytes32) { return _provenanceHash; } /** * @dev Returns address of Mars26 ERC-20 token contract. */ function m26Address() public view returns (address) { return address(_m26); } /** * @dev Returns address of connected storage contract. */ function storageAddress() public view returns (address) { return address(_storage); } /** * @dev Returns the number of sold NFTs. */ function numSoldTokens() public view returns (uint256) { return _numSoldTokens; } /** * @dev Returns the MNCT price for changing the name of a token. */ function nameChangePrice() public view returns (uint256) { return _nameChangePrice; } /** * @dev Returns the start timestamp of the initial sale. */ function saleStartTimestamp() public view returns (uint256) { return _saleStartTimestamp; } /** * @dev Returns the reveal timestamp after which the token ids will be assigned. */ function revealTimestamp() public view returns (uint256) { return _revealTimestamp; } /** * @dev Returns the randomized starting index to assign and reveal token ids to * intial sequence of NFTs. */ function startingIndex() public view returns (uint256) { return _startingIndex; } /** * @dev Returns the randomized starting index block which is used to derive * {_startingIndex} from. */ function startingIndexBlock() public view returns (uint256) { return _startingIndexBlock; } /** * @dev See {MarsStorage.initialSequenceTokenCID} */ function initialSequenceTokenCID(uint256 initialSequenceIndex) public view returns (string memory) { return _storage.initialSequenceTokenCID(initialSequenceIndex); } /** * @dev Returns if {nameString} has been reserved. */ function isNameReserved(string memory nameString) public view returns (bool) { return _reservedNames[_toLower(nameString)]; } /** * @dev Returns reverved name for given token id. */ function tokenNames(uint256 tokenId) public view returns (string memory) { return _tokenNames[tokenId]; } /** * @dev Returns the set token URI, i.e. IPFS v0 CID, of {tokenId}. * Prefixed with ipfs:// */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); require(_startingIndex > 0, "Tokens have not been assigned yet"); uint256 initialSequenceIndex = _toInitialSequenceIndex(tokenId); return tokenURIOfInitialSequenceIndex(initialSequenceIndex); } /** * @dev Returns the set token URI, i.e. IPFS v0 CID, of {initialSequenceIndex}. * Prefixed with ipfs:// */ function tokenURIOfInitialSequenceIndex(uint256 initialSequenceIndex) public view returns (string memory) { require(_startingIndex > 0, "Tokens have not been assigned yet"); string memory tokenCID = initialSequenceTokenCID(initialSequenceIndex); string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return tokenCID; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(tokenCID).length > 0) { return string(abi.encodePacked(base, tokenCID)); } return base; } /** * @dev Returns if the NFT has been minted before reveal phase. */ function isMintedBeforeReveal(uint256 index) public view returns (bool) { return _mintedBeforeReveal[index]; } /** * @dev Gets current NFT price based on already sold tokens. */ function getNFTPrice() public view returns (uint256) { if (_numSoldTokens < 800) { return 0.01 ether; } else if (_numSoldTokens < 4400) { return 0.02 ether; } else if (_numSoldTokens < 8800) { return 0.03 ether; } else if (_numSoldTokens < 12600) { return 0.05 ether; } else if (_numSoldTokens < 14040) { return 0.1 ether; } else if (_numSoldTokens < 14392) { return 0.3 ether; } else { return 1 ether; } } /** * @dev Mints Mars NFTs */ function mint(uint256 numberOfNfts) public payable { require(block.timestamp >= _saleStartTimestamp, "Sale has not started"); require(totalSupply() < MAX_SUPPLY, "Sale has already ended"); require(numberOfNfts > 0, "Cannot buy 0 NFTs"); require(numberOfNfts <= 20, "You may not buy more than 20 NFTs at once"); require(_numSoldTokens.add(numberOfNfts) <= MAX_SUPPLY.sub(RESERVED_SUPPLY), "Exceeds max number of sellable NFTs"); require(getNFTPrice().mul(numberOfNfts) == msg.value, "Ether value sent is not correct"); for (uint i = 0; i < numberOfNfts; i++) { uint mintIndex = totalSupply(); _numSoldTokens++; require(mintIndex < MAX_SUPPLY, "Exceeds max number of NFTs in existence"); if (block.timestamp < _revealTimestamp) { _mintedBeforeReveal[mintIndex] = true; } _safeMint(msg.sender, mintIndex); } // Source of randomness. Theoretical miner withhold manipulation possible but should be sufficient in a pragmatic sense if (_startingIndexBlock == 0 && (_numSoldTokens >= MAX_SUPPLY.sub(RESERVED_SUPPLY) || block.timestamp >= _revealTimestamp)) { _startingIndexBlock = block.number; } } /** * @dev Used to migrate already minted NFTs of old contract. */ function mintReserved(address to, uint256 numOfNFTs) public onlyOwner { require(totalSupply().add(numOfNFTs) <= MAX_SUPPLY, "Exceeds max supply of NFTs"); require(_numMintedReservedTokens.add(numOfNFTs) <= RESERVED_SUPPLY, "Exceeds max num of reserved NFTs"); for (uint j = 0; j < numOfNFTs; j++) { uint tokenId = totalSupply(); if (block.timestamp < _revealTimestamp) { _mintedBeforeReveal[tokenId] = true; } _numMintedReservedTokens++; _safeMint(to, tokenId); } } /** * @dev Finalize starting index */ function finalizeStartingIndex() public { require(_startingIndex == 0, "Starting index is already set"); require(_startingIndexBlock != 0, "Starting index block must be set"); _startingIndex = uint(blockhash(_startingIndexBlock)) % MAX_SUPPLY; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if (block.number.sub(_startingIndexBlock) > 255) { _startingIndex = uint(blockhash(block.number - 1)) % MAX_SUPPLY; } // Prevent default sequence if (_startingIndex == 0) { _startingIndex = _startingIndex.add(1); } } /** * @dev Changes the name for Mars tile tokenId */ function changeName(uint256 tokenId, string memory newName) public { address owner = ownerOf(tokenId); require(_msgSender() == owner, "ERC721: caller is not the owner"); require(_validateName(newName) == true, "Not a valid new name"); require(sha256(bytes(newName)) != sha256(bytes(_tokenNames[tokenId])), "New name is same as the current one"); require(isNameReserved(newName) == false, "Name already reserved"); _m26.transferFrom(msg.sender, address(this), _nameChangePrice); // If already named, dereserve old name if (bytes(_tokenNames[tokenId]).length > 0) { _toggleReserveName(_tokenNames[tokenId], false); } _toggleReserveName(newName, true); _tokenNames[tokenId] = newName; _m26.burn(_nameChangePrice); emit NameChange(tokenId, newName); } /** * @dev See {MarsStorage.setInitialSequenceTokenHashes} */ function setInitialSequenceTokenHashes(bytes32[] memory tokenHashes) onlyOwner public { _storage.setInitialSequenceTokenHashes(tokenHashes); } /** * @dev See {MarsStorage.setInitialSequenceTokenHashesAtIndex} */ function setInitialSequenceTokenHashesAtIndex( uint256 startIndex, bytes32[] memory tokenHashes ) public onlyOwner { _storage.setInitialSequenceTokenHashesAtIndex(startIndex, tokenHashes); } /** * @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space) */ function _validateName(string memory str) private pure returns (bool){ bytes memory b = bytes(str); if (b.length < 1) return false; if (b.length > 50) return false; // Cannot be longer than 25 characters if (b[0] == 0x20) return false; // Leading space if (b[b.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar = b[0]; for (uint i; i < b.length; i++) { bytes1 char = b[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces if ( !(char >= 0x30 && char <= 0x39) && //9-0 !(char >= 0x41 && char <= 0x5A) && //A-Z !(char >= 0x61 && char <= 0x7A) && //a-z !(char == 0x20) //space ) return false; lastChar = char; } return true; } /** * @dev Converts the string to lowercase */ function _toLower(string memory str) private pure returns (string memory){ bytes memory bStr = bytes(str); bytes memory bLower = new bytes(bStr.length); for (uint i = 0; i < bStr.length; i++) { // Uppercase character if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { bLower[i] = bytes1(uint8(bStr[i]) + 32); } else { bLower[i] = bStr[i]; } } return string(bLower); } /** * @dev Reserves the name if isReserve is set to true, de-reserves if set to false */ function _toggleReserveName(string memory str, bool isReserve) internal { _reservedNames[_toLower(str)] = isReserve; } function _baseURI() internal pure override returns (string memory) { return "ipfs://"; } function _toInitialSequenceIndex(uint256 tokenId) internal view returns (uint256) { return (tokenId + _startingIndex) % MAX_SUPPLY; } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT 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 no longer needed starting with Solidity 0.8. 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. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * 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: MIT pragma solidity ^0.8.0; import "../utils/Address.sol"; import "../utils/Context.sol"; import "../utils/math/SafeMath.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor (address[] memory payees, uint256[] memory shares_) payable { // solhint-disable-next-line max-line-length require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive () external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = totalReceived * _shares[account] / _totalShares - _released[account]; require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] = _released[account] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./Mars.sol"; /** * Mars26 Contract * @dev Extends standard ERC20 contract */ contract Mars26 is ERC20Burnable, Ownable { using SafeMath for uint256; uint256 public constant INITIAL_ALLOTMENT = 2026 * (10 ** 18); uint256 public constant PRE_REVEAL_MULTIPLIER = 2; uint256 private constant _SECONDS_IN_A_DAY = 86400; uint256 private _emissionStartTimestamp; uint256 private _emissionEndTimestamp; uint256 private _emissionPerDay; mapping(uint256 => uint256) private _lastClaim; Mars private _mars; /** * @dev Sets immutable values of contract. */ constructor ( uint256 emissionStartTimestamp_, uint256 emissionEndTimestamp_, uint256 emissionPerDay_ ) ERC20("Mars26", "M26") { _emissionStartTimestamp = emissionStartTimestamp_; _emissionEndTimestamp = emissionEndTimestamp_; _emissionPerDay = emissionPerDay_; } function emissionStartTimestamp() public view returns (uint256) { return _emissionStartTimestamp; } function emissionEndTimestamp() public view returns (uint256) { return _emissionEndTimestamp; } function emissionPerDay() public view returns (uint256) { return _emissionPerDay; } function marsAddress() public view returns (address) { return address(_mars); } /** * @dev Sets Mars contract address. Can only be called once by owner. */ function setMarsAddress(address payable marsAddress_) public onlyOwner { require(address(_mars) == address(0), "Already set"); _mars = Mars(marsAddress_); } /** * @dev Returns timestamp at which accumulated M26s have last been claimed for a {tokenIndex}. */ function lastClaim(uint256 tokenIndex) public view returns (uint256) { require(_mars.ownerOf(tokenIndex) != address(0), "Owner cannot be 0 address"); require(tokenIndex < _mars.totalSupply(), "NFT at index has not been minted yet"); uint256 lastClaimed = uint256(_lastClaim[tokenIndex]) != 0 ? uint256(_lastClaim[tokenIndex]) : _emissionStartTimestamp; return lastClaimed; } /** * @dev Returns amount of accumulated M26s for {tokenIndex}. */ function accumulated(uint256 tokenIndex) public view returns (uint256) { require(block.timestamp > _emissionStartTimestamp, "Emission has not started yet"); require(_mars.ownerOf(tokenIndex) != address(0), "Owner cannot be 0 address"); require(tokenIndex < _mars.totalSupply(), "NFT at index has not been minted yet"); uint256 lastClaimed = lastClaim(tokenIndex); // Sanity check if last claim was on or after emission end if (lastClaimed >= _emissionEndTimestamp) return 0; uint256 accumulationPeriod = block.timestamp < _emissionEndTimestamp ? block.timestamp : _emissionEndTimestamp; // Getting the min value of both uint256 totalAccumulated = accumulationPeriod .sub(lastClaimed) .mul(_emissionPerDay) .div(_SECONDS_IN_A_DAY); // If claim hasn't been done before for the index, add initial allotment (plus prereveal multiplier if applicable) if (lastClaimed == _emissionStartTimestamp) { uint256 initialAllotment = _mars.isMintedBeforeReveal(tokenIndex) == true ? INITIAL_ALLOTMENT.mul(PRE_REVEAL_MULTIPLIER) : INITIAL_ALLOTMENT; totalAccumulated = totalAccumulated.add(initialAllotment); } return totalAccumulated; } /** * @dev Claim mints M26s and supports multiple token indices at once. */ function claim(uint256[] memory tokenIndices) public returns (uint256) { require(block.timestamp > _emissionStartTimestamp, "Emission has not started yet"); uint256 totalClaimQty = 0; for (uint i = 0; i < tokenIndices.length; i++) { // Sanity check for non-minted index require(tokenIndices[i] < _mars.totalSupply(), "NFT at index has not been minted yet"); // Duplicate token index check for (uint j = i + 1; j < tokenIndices.length; j++) { require(tokenIndices[i] != tokenIndices[j], "Duplicate token index"); } uint tokenIndex = tokenIndices[i]; require(_mars.ownerOf(tokenIndex) == msg.sender, "Sender is not the owner"); uint256 claimQty = accumulated(tokenIndex); if (claimQty != 0) { totalClaimQty = totalClaimQty.add(claimQty); _lastClaim[tokenIndex] = block.timestamp; } } require(totalClaimQty != 0, "No accumulated M26"); _mint(msg.sender, totalClaimQty); increaseAllowance(address(_mars), totalClaimQty); return totalClaimQty; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; /** * @title MarsStorage contract */ contract MarsStorage is Ownable { using SafeMath for uint256; // hash code: 0x12 (SHA-2) and digest length: 0x20 (32 bytes / 256 bits) bytes2 public constant MULTIHASH_PREFIX = 0x1220; // IPFS CID Version: v0 uint256 public constant CID_VERSION = 0; // IPFS v0 CIDs in hexadecimal without multihash prefix ordered by initial sequence bytes32[] private _intitialSequenceTokenHashes; uint256 internal _maxSupply; bytes internal constant _ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; /** * @dev Sets immutable values of contract. */ constructor (uint256 maxSupply_) { _maxSupply = maxSupply_; } /** * @dev Returns the IPFS v0 CID of {initialSequenceIndex}. * * The returned values can be concatenated and hashed using SHA2-256 to verify the * provenance hash. */ function initialSequenceTokenCID(uint256 initialSequenceIndex) public view returns (string memory) { bytes memory tokenCIDHex = abi.encodePacked( MULTIHASH_PREFIX, _intitialSequenceTokenHashes[initialSequenceIndex] ); string memory tokenCID = _toBase58(tokenCIDHex); return tokenCID; } /** * @dev Sets token hashes in the initially set order as verifiable through * {_provenanceHash}. * * Provided {tokenHashes} are IPFS v0 CIDs in hexadecimal without the prefix 0x1220 * and ordered in the initial sequence. */ function setInitialSequenceTokenHashes(bytes32[] memory tokenHashes) onlyOwner public { setInitialSequenceTokenHashesAtIndex(_intitialSequenceTokenHashes.length, tokenHashes); } /** * @dev Sets token hashes in the initially set order starting at {startIndex}. */ function setInitialSequenceTokenHashesAtIndex( uint256 startIndex, bytes32[] memory tokenHashes ) public onlyOwner { require(startIndex <= _intitialSequenceTokenHashes.length); for (uint256 i = 0; i < tokenHashes.length; i++) { if ((i + startIndex) >= _intitialSequenceTokenHashes.length) { _intitialSequenceTokenHashes.push(tokenHashes[i]); } else { _intitialSequenceTokenHashes[i + startIndex] = tokenHashes[i]; } } require(_intitialSequenceTokenHashes.length <= _maxSupply); } // Source: verifyIPFS (https://github.com/MrChico/verifyIPFS/blob/master/contracts/verifyIPFS.sol) // @author Martin Lundfall ([email protected]) // @dev Converts hex string to base 58 function _toBase58(bytes memory source) internal pure returns (string memory) { if (source.length == 0) return new string(0); uint8[] memory digits = new uint8[](46); digits[0] = 0; uint8 digitlength = 1; for (uint256 i = 0; i < source.length; ++i) { uint256 carry = uint8(source[i]); for (uint256 j = 0; j < digitlength; ++j) { carry += uint256(digits[j]) * 256; digits[j] = uint8(carry % 58); carry = carry / 58; } while (carry > 0) { digits[digitlength] = uint8(carry % 58); digitlength++; carry = carry / 58; } } return string(_toAlphabet(_reverse(_truncate(digits, digitlength)))); } function _truncate(uint8[] memory array, uint8 length) internal pure returns (uint8[] memory) { uint8[] memory output = new uint8[](length); for (uint256 i = 0; i < length; i++) { output[i] = array[i]; } return output; } function _reverse(uint8[] memory input) internal pure returns (uint8[] memory) { uint8[] memory output = new uint8[](input.length); for (uint256 i = 0; i < input.length; i++) { output[i] = input[input.length - 1 - i]; } return output; } function _toAlphabet(uint8[] memory indices) internal pure returns (bytes memory) { bytes memory output = new bytes(indices.length); for (uint256 i = 0; i < indices.length; i++) { output[i] = _ALPHABET[indices[i]]; } return output; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "./extensions/IERC721Enumerable.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}. 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 || ERC721.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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //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 || ERC721.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 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(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly 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` 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 { } }
// SPDX-License-Identifier: MIT 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 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 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 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 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; // solhint-disable-next-line no-inline-assembly 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"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT 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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), currentAllowance - amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"provenanceHash_","type":"bytes32"},{"internalType":"address","name":"m26Address_","type":"address"},{"internalType":"uint256","name":"nameChangePrice_","type":"uint256"},{"internalType":"uint256","name":"saleStartTimestamp_","type":"uint256"},{"internalType":"uint256","name":"revealTimestamp_","type":"uint256"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"}],"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":true,"internalType":"uint256","name":"maskIndex","type":"uint256"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESERVED_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalizeStartingIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNFTPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"initialSequenceIndex","type":"uint256"}],"name":"initialSequenceTokenCID","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isMintedBeforeReveal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m26Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfNfts","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"numOfNFTs","type":"uint256"}],"name":"mintReserved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameChangePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numSoldTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"tokenHashes","type":"bytes32[]"}],"name":"setInitialSequenceTokenHashes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"bytes32[]","name":"tokenHashes","type":"bytes32[]"}],"name":"setInitialSequenceTokenHashesAtIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storageAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenNames","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"uint256","name":"initialSequenceIndex","type":"uint256"}],"name":"tokenURIOfInitialSequenceIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004f1738038062004f17833981016040819052620000349162000613565b8181604051806040016040528060048152602001634d61727360e01b815250604051806040016040528060048152602001634d41525360e01b815250600062000082620002d960201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000e1906001906020850190620004cb565b508051620000f7906002906020840190620004cb565b50505080518251146200016c5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001bf5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000163565b60005b825181101562000243576200022e838281518110620001f157634e487b7160e01b600052603260045260246000fd5b60200260200101518383815181106200021a57634e487b7160e01b600052603260045260246000fd5b6020026020010151620002dd60201b60201c565b806200023a81620007d0565b915050620001c2565b5050506010879055601b80546001600160a01b0319166001600160a01b038816179055601185905560128490556013839055604051613f489062000287906200055a565b908152602001604051809103906000f080158015620002aa573d6000803e3d6000fd5b50601c80546001600160a01b0319166001600160a01b0392909216919091179055506200081a95505050505050565b3390565b6001600160a01b0382166200034a5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000163565b600081116200039c5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000163565b6001600160a01b0382166000908152600d602052604090205415620004185760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000163565b600f8054600181019091557f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b0319166001600160a01b0384169081179091556000908152600d60205260409020819055600b546200048290829062000778565b600b55604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054620004d99062000793565b90600052602060002090601f016020900481019282620004fd576000855562000548565b82601f106200051857805160ff191683800117855562000548565b8280016001018555821562000548579182015b82811115620005485782518255916020019190600101906200052b565b506200055692915062000568565b5090565b610d5c80620041bb83390190565b5b8082111562000556576000815560010162000569565b80516001600160a01b03811681146200059757600080fd5b919050565b600082601f830112620005ad578081fd5b81516020620005c6620005c08362000752565b6200071f565b80838252828201915082860187848660051b8901011115620005e6578586fd5b855b858110156200060657815184529284019290840190600101620005e8565b5090979650505050505050565b600080600080600080600060e0888a0312156200062e578283fd5b87519650602062000641818a016200057f565b60408a015160608b015160808c015160a08d0151939a50919850965094506001600160401b038082111562000674578485fd5b818b0191508b601f83011262000688578485fd5b815162000699620005c08262000752565b8082825285820191508585018f878560051b8801011115620006b9578889fd5b8895505b83861015620006e657620006d1816200057f565b835260019590950194918601918601620006bd565b5060c08e0151909750945050508083111562000700578384fd5b5050620007108a828b016200059c565b91505092959891949750929550565b604051601f8201601f191681016001600160401b03811182821017156200074a576200074a62000804565b604052919050565b60006001600160401b038211156200076e576200076e62000804565b5060051b60200190565b600082198211156200078e576200078e620007ee565b500190565b600181811c90821680620007a857607f821691505b60208210811415620007ca57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415620007e757620007e7620007ee565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b613991806200082a6000396000f3fe6080604052600436106102975760003560e01c80638b83209b1161015a578063c6ab67a3116100c1578063e36d64981161007a578063e36d649814610803578063e985e9c514610818578063f2fde38b14610861578063f41d291014610881578063f62f3c11146108a1578063fb107a4f146108b6576102e7565b8063c6ab67a31461074e578063c87b56dd14610763578063cb774d4714610783578063ce7c2ac214610798578063d9dfc0af146107ce578063e33b7de3146107ee576102e7565b8063a0d44c4a11610113578063a0d44c4a14610689578063a22cb4651461069e578063b29d1860146106be578063b88d4fde146106de578063bc28d702146106fe578063c39cbef11461072e576102e7565b80638b83209b146105cd5780638da5cb5b146105ed57806395d89b411461060b5780639852595c1461062057806398ba8ebf14610656578063a0712d6814610676576102e7565b806332cb6b0c116101fe5780636352211e116101b75780636352211e1461052557806370a0823114610545578063715018a61461056557806374df39c91461057a5780637de55fe11461058f57806385aa92a7146105af576102e7565b806332cb6b0c146104905780633a98ef39146104a65780633c276d86146104bb57806342842e0e146104d057806345ca7738146104f05780634f6ccce714610505576102e7565b8063191655871161025057806319165587146103dc5780631c1475be146103fc57806323b872dd1461041a5780632f745c591461043a578063310495ab1461045a57806331a53e9a1461047a576102e7565b806301ffc9a7146102ec57806306fdde0314610321578063081812fc14610343578063095ea7b31461037b57806315b56d101461039d57806318160ddd146103bd576102e7565b366102e7577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706102c56108cb565b604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102f857600080fd5b5061030c610307366004613313565b6108d0565b60405190151581526020015b60405180910390f35b34801561032d57600080fd5b506103366108fd565b6040516103189190613625565b34801561034f57600080fd5b5061036361035e3660046133f1565b61098f565b6040516001600160a01b039091168152602001610318565b34801561038757600080fd5b5061039b610396366004613281565b610a29565b005b3480156103a957600080fd5b5061030c6103b836600461334b565b610b51565b3480156103c957600080fd5b506009545b604051908152602001610318565b3480156103e857600080fd5b5061039b6103f7366004613143565b610b85565b34801561040857600080fd5b50601b546001600160a01b0316610363565b34801561042657600080fd5b5061039b610435366004613197565b610d56565b34801561044657600080fd5b506103ce610455366004613281565b610d8e565b34801561046657600080fd5b506103366104753660046133f1565b610e24565b34801561048657600080fd5b506103ce61070d81565b34801561049c57600080fd5b506103ce613f4881565b3480156104b257600080fd5b50600b546103ce565b3480156104c757600080fd5b506012546103ce565b3480156104dc57600080fd5b5061039b6104eb366004613197565b610ec6565b3480156104fc57600080fd5b506011546103ce565b34801561051157600080fd5b506103ce6105203660046133f1565b610ee1565b34801561053157600080fd5b506103636105403660046133f1565b610f82565b34801561055157600080fd5b506103ce610560366004613143565b610ff9565b34801561057157600080fd5b5061039b611080565b34801561058657600080fd5b5061039b611113565b34801561059b57600080fd5b5061039b6105aa366004613281565b611215565b3480156105bb57600080fd5b50601c546001600160a01b0316610363565b3480156105d957600080fd5b506103636105e83660046133f1565b61138f565b3480156105f957600080fd5b506000546001600160a01b0316610363565b34801561061757600080fd5b506103366113cd565b34801561062c57600080fd5b506103ce61063b366004613143565b6001600160a01b03166000908152600e602052604090205490565b34801561066257600080fd5b506103366106713660046133f1565b6113dc565b61039b6106843660046133f1565b611480565b34801561069557600080fd5b506016546103ce565b3480156106aa57600080fd5b5061039b6106b9366004613254565b61179f565b3480156106ca57600080fd5b5061039b6106d93660046132ac565b6118a1565b3480156106ea57600080fd5b5061039b6106f93660046131d7565b61194f565b34801561070a57600080fd5b5061030c6107193660046133f1565b6000908152601a602052604090205460ff1690565b34801561073a57600080fd5b5061039b61074936600461344e565b61198e565b34801561075a57600080fd5b506010546103ce565b34801561076f57600080fd5b5061033661077e3660046133f1565b611dcc565b34801561078f57600080fd5b506015546103ce565b3480156107a457600080fd5b506103ce6107b3366004613143565b6001600160a01b03166000908152600d602052604090205490565b3480156107da57600080fd5b5061039b6107e9366004613409565b611e85565b3480156107fa57600080fd5b50600c546103ce565b34801561080f57600080fd5b506014546103ce565b34801561082457600080fd5b5061030c61083336600461315f565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561086d57600080fd5b5061039b61087c366004613143565b611f36565b34801561088d57600080fd5b5061033661089c3660046133f1565b61203f565b3480156108ad57600080fd5b506013546103ce565b3480156108c257600080fd5b506103ce6120c0565b335b90565b60006001600160e01b0319821663780e9d6360e01b14806108f557506108f58261216f565b90505b919050565b60606001805461090c90613876565b80601f016020809104026020016040519081016040528092919081815260200182805461093890613876565b80156109855780601f1061095a57610100808354040283529160200191610985565b820191906000526020600020905b81548152906001019060200180831161096857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a3482610f82565b9050806001600160a01b0316836001600160a01b03161415610aa25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a04565b806001600160a01b0316610ab46108cb565b6001600160a01b03161480610ad05750610ad0816108336108cb565b610b425760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a04565b610b4c83836121bf565b505050565b60006019610b5e8361222d565b604051610b6b91906134ef565b9081526040519081900360200190205460ff169050919050565b6001600160a01b0381166000908152600d6020526040902054610bf95760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610a04565b6000600c5447610c0991906137c3565b6001600160a01b0383166000908152600e6020908152604080832054600b54600d909352908320549394509192610c409085613814565b610c4a9190613800565b610c549190613833565b905080610cb75760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a04565b6001600160a01b0383166000908152600e6020526040902054610cdb9082906137c3565b6001600160a01b0384166000908152600e6020526040902055600c54610d029082906137c3565b600c55610d0f83826123f2565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610d67610d616108cb565b8261250b565b610d835760405162461bcd60e51b8152600401610a0490613700565b610b4c838383612602565b6000610d9983610ff9565b8210610dfb5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a04565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000818152601860205260409020805460609190610e4190613876565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6d90613876565b8015610eba5780601f10610e8f57610100808354040283529160200191610eba565b820191906000526020600020905b815481529060010190602001808311610e9d57829003601f168201915b50505050509050919050565b610b4c8383836040518060200160405280600081525061194f565b6000610eec60095490565b8210610f4f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a04565b60098281548110610f7057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806108f55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a04565b60006001600160a01b0382166110645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a04565b506001600160a01b031660009081526004602052604090205490565b6110886108cb565b6001600160a01b03166110a36000546001600160a01b031690565b6001600160a01b0316146110c95760405162461bcd60e51b8152600401610a04906136cb565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b601554156111635760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610a04565b6014546111b25760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206d757374206265207365746044820152606401610a04565b6014546111c390613f4890406138cc565b60155560145460ff906111d79043906127ad565b11156111fa57613f486111eb600143613833565b6111f69190406138cc565b6015555b6015546112135760155461120f9060016127b9565b6015555b565b61121d6108cb565b6001600160a01b03166112386000546001600160a01b031690565b6001600160a01b03161461125e5760405162461bcd60e51b8152600401610a04906136cb565b613f486112748261126e60095490565b906127b9565b11156112c25760405162461bcd60e51b815260206004820152601a60248201527f45786365656473206d617820737570706c79206f66204e4654730000000000006044820152606401610a04565b60175461070d906112d390836127b9565b11156113215760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206e756d206f66207265736572766564204e4654736044820152606401610a04565b60005b81811015610b4c57600061133760095490565b905060135442101561135d576000818152601a60205260409020805460ff191660011790555b6017805490600061136d836138b1565b919050555061137c84826127c5565b5080611387816138b1565b915050611324565b6000600f82815481106113b257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b60606002805461090c90613876565b60606000601554116114005760405162461bcd60e51b8152600401610a0490613638565b600061140b8361203f565b90506000611433604080518082019091526007815266697066733a2f2f60c81b602082015290565b9050805160001415611447575090506108f8565b8151156114795780826040516020016114619291906135a6565b604051602081830303815290604052925050506108f8565b9392505050565b6012544210156114c95760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185cc81b9bdd081cdd185c9d195960621b6044820152606401610a04565b613f486114d560095490565b1061151b5760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b6044820152606401610a04565b6000811161155f5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f74206275792030204e46547360781b6044820152606401610a04565b60148111156115c25760405162461bcd60e51b815260206004820152602960248201527f596f75206d6179206e6f7420627579206d6f7265207468616e203230204e465460448201526873206174206f6e636560b81b6064820152608401610a04565b6115d0613f4861070d6127ad565b6016546115dd90836127b9565b11156116375760405162461bcd60e51b815260206004820152602360248201527f45786365656473206d6178206e756d626572206f662073656c6c61626c65204e60448201526246547360e81b6064820152608401610a04565b3461164a826116446120c0565b906127e3565b146116975760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a04565b60005b818110156117665760006116ad60095490565b6016805491925060006116bf836138b1565b9190505550613f4881106117255760405162461bcd60e51b815260206004820152602760248201527f45786365656473206d6178206e756d626572206f66204e46547320696e206578604482015266697374656e636560c81b6064820152608401610a04565b601354421015611749576000818152601a60205260409020805460ff191660011790555b61175333826127c5565b508061175e816138b1565b91505061169a565b506014541580156117925750611780613f4861070d6127ad565b60165410158061179257506013544210155b1561179c57436014555b50565b6117a76108cb565b6001600160a01b0316826001600160a01b031614156118085760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a04565b80600660006118156108cb565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556118596108cb565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611895911515815260200190565b60405180910390a35050565b6118a96108cb565b6001600160a01b03166118c46000546001600160a01b031690565b6001600160a01b0316146118ea5760405162461bcd60e51b8152600401610a04906136cb565b601c54604051630594e8c360e51b81526001600160a01b039091169063b29d18609061191a908490600401613612565b600060405180830381600087803b15801561193457600080fd5b505af1158015611948573d6000803e3d6000fd5b5050505050565b61196061195a6108cb565b8361250b565b61197c5760405162461bcd60e51b8152600401610a0490613700565b611988848484846127ef565b50505050565b600061199983610f82565b9050806001600160a01b03166119ad6108cb565b6001600160a01b031614611a035760405162461bcd60e51b815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610a04565b611a0c82612822565b1515600114611a545760405162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b6044820152606401610a04565b600083815260186020526040908190209051600291611a729161350b565b602060405180830381855afa158015611a8f573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611ab291906132fb565b600283604051611ac291906134ef565b602060405180830381855afa158015611adf573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611b0291906132fb565b1415611b5c5760405162461bcd60e51b815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e74206044820152626f6e6560e81b6064820152608401610a04565b611b6582610b51565b15611baa5760405162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b6044820152606401610a04565b601b546011546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015611c0057600080fd5b505af1158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3891906132df565b5060008381526018602052604081208054611c5290613876565b90501115611cfd5760008381526018602052604090208054611cfd9190611c7890613876565b80601f0160208091040260200160405190810160405280929190818152602001828054611ca490613876565b8015611cf15780601f10611cc657610100808354040283529160200191611cf1565b820191906000526020600020905b815481529060010190602001808311611cd457829003601f168201915b50505050506000612a6f565b611d08826001612a6f565b60008381526018602090815260409091208351611d2792850190612fca565b50601b54601154604051630852cd8d60e31b81526001600160a01b03909216916342966c6891611d5d9160040190815260200190565b600060405180830381600087803b158015611d7757600080fd5b505af1158015611d8b573d6000803e3d6000fd5b50505050827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051611dbf9190613625565b60405180910390a2505050565b6000818152600360205260409020546060906001600160a01b0316611e4d5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a04565b600060155411611e6f5760405162461bcd60e51b8152600401610a0490613638565b6000611e7a83612aac565b9050611479816113dc565b611e8d6108cb565b6001600160a01b0316611ea86000546001600160a01b031690565b6001600160a01b031614611ece5760405162461bcd60e51b8152600401610a04906136cb565b601c5460405163d9dfc0af60e01b81526001600160a01b039091169063d9dfc0af90611f009085908590600401613751565b600060405180830381600087803b158015611f1a57600080fd5b505af1158015611f2e573d6000803e3d6000fd5b505050505050565b611f3e6108cb565b6001600160a01b0316611f596000546001600160a01b031690565b6001600160a01b031614611f7f5760405162461bcd60e51b8152600401610a04906136cb565b6001600160a01b038116611fe45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a04565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b601c54604051630f41d29160e41b8152600481018390526060916001600160a01b03169063f41d29109060240160006040518083038186803b15801561208457600080fd5b505afa158015612098573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108f5919081019061337e565b600061032060165410156120dc5750662386f26fc100006108cd565b61113060165410156120f6575066470de4df8200006108cd565b61226060165410156121105750666a94d74f4300006108cd565b613138601654101561212a575066b1a2bc2ec500006108cd565b6136d86016541015612145575067016345785d8a00006108cd565b61383860165410156121605750670429d069189e00006108cd565b50670de0b6b3a76400006108cd565b60006001600160e01b031982166380ac58cd60e01b14806121a057506001600160e01b03198216635b5e139f60e01b145b806108f557506301ffc9a760e01b6001600160e01b03198316146108f5565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121f482610f82565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606060008290506000815167ffffffffffffffff81111561225e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612288576020820181803683370190505b50905060005b82518110156123ea5760418382815181106122b957634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906122f75750605a8382815181106122ec57634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b156123755782818151811061231c57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c602061233691906137db565b60f81b82828151811061235957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506123d8565b82818151811061239557634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b8282815181106123c057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b806123e2816138b1565b91505061228e565b509392505050565b804710156124425760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a04565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5050905080610b4c5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a04565b6000818152600360205260408120546001600160a01b03166125845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a04565b600061258f83610f82565b9050806001600160a01b0316846001600160a01b031614806125ca5750836001600160a01b03166125bf8461098f565b6001600160a01b0316145b806125fa57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661261582610f82565b6001600160a01b03161461267d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a04565b6001600160a01b0382166126df5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a04565b6126ea838383612ac9565b6126f56000826121bf565b6001600160a01b038316600090815260046020526040812080546001929061271e908490613833565b90915550506001600160a01b038216600090815260046020526040812080546001929061274c9084906137c3565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006114798284613833565b600061147982846137c3565b6127df828260405180602001604052806000815250612b86565b5050565b60006114798284613814565b6127fa848484612602565b61280684848484612bb9565b6119885760405162461bcd60e51b8152600401610a0490613679565b60008082905060018151101561283c5760009150506108f8565b6032815111156128505760009150506108f8565b8060008151811061287157634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156128965760009150506108f8565b80600182516128a59190613833565b815181106128c357634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156128e85760009150506108f8565b60008160008151811061290b57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b8251811015612a6457600083828151811061294a57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b8114801561297b5750600160fd1b6001600160f81b03198416145b1561298d5760009450505050506108f8565b600360fc1b6001600160f81b03198216108015906129b95750603960f81b6001600160f81b0319821611155b1580156129ef5750604160f81b6001600160f81b03198216108015906129ed5750602d60f91b6001600160f81b0319821611155b155b8015612a245750606160f81b6001600160f81b0319821610801590612a225750603d60f91b6001600160f81b0319821611155b155b8015612a3e5750600160fd1b6001600160f81b0319821614155b15612a505760009450505050506108f8565b915080612a5c816138b1565b91505061291f565b506001949350505050565b806019612a7b8461222d565b604051612a8891906134ef565b908152604051908190036020019020805491151560ff199092169190911790555050565b6000613f4860155483612abf91906137c3565b6108f591906138cc565b6001600160a01b038316612b2457612b1f81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612b47565b816001600160a01b0316836001600160a01b031614612b4757612b478382612cc2565b6001600160a01b038216612b6357612b5e81612d5f565b610b4c565b826001600160a01b0316826001600160a01b031614610b4c57610b4c8282612e38565b612b908383612e7c565b612b9d6000848484612bb9565b610b4c5760405162461bcd60e51b8152600401610a0490613679565b60006001600160a01b0384163b15612a6457836001600160a01b031663150b7a02612be26108cb565b8786866040518563ffffffff1660e01b8152600401612c0494939291906135d5565b602060405180830381600087803b158015612c1e57600080fd5b505af1925050508015612c4e575060408051601f3d908101601f19168201909252612c4b9181019061332f565b60015b612ca8573d808015612c7c576040519150601f19603f3d011682016040523d82523d6000602084013e612c81565b606091505b508051612ca05760405162461bcd60e51b8152600401610a0490613679565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506125fa565b60006001612ccf84610ff9565b612cd99190613833565b600083815260086020526040902054909150808214612d2c576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090612d7190600190613833565b6000838152600a602052604081205460098054939450909284908110612da757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060098381548110612dd657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612e1c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612e4383610ff9565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b038216612ed25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a04565b6000818152600360205260409020546001600160a01b031615612f375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a04565b612f4360008383612ac9565b6001600160a01b0382166000908152600460205260408120805460019290612f6c9084906137c3565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612fd690613876565b90600052602060002090601f016020900481019282612ff8576000855561303e565b82601f1061301157805160ff191683800117855561303e565b8280016001018555821561303e579182015b8281111561303e578251825591602001919060010190613023565b5061304a92915061304e565b5090565b5b8082111561304a576000815560010161304f565b60006130766130718461379b565b61376a565b905082815283838301111561308a57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126130b1578081fd5b8135602067ffffffffffffffff8211156130cd576130cd61390c565b8160051b6130dc82820161376a565b8381528281019086840183880185018910156130f6578687fd5b8693505b858410156131185780358352600193909301929184019184016130fa565b50979650505050505050565b600082601f830112613134578081fd5b61147983833560208501613063565b600060208284031215613154578081fd5b813561147981613922565b60008060408385031215613171578081fd5b823561317c81613922565b9150602083013561318c81613922565b809150509250929050565b6000806000606084860312156131ab578081fd5b83356131b681613922565b925060208401356131c681613922565b929592945050506040919091013590565b600080600080608085870312156131ec578081fd5b84356131f781613922565b9350602085013561320781613922565b925060408501359150606085013567ffffffffffffffff811115613229578182fd5b8501601f81018713613239578182fd5b61324887823560208401613063565b91505092959194509250565b60008060408385031215613266578182fd5b823561327181613922565b9150602083013561318c81613937565b60008060408385031215613293578182fd5b823561329e81613922565b946020939093013593505050565b6000602082840312156132bd578081fd5b813567ffffffffffffffff8111156132d3578182fd5b6125fa848285016130a1565b6000602082840312156132f0578081fd5b815161147981613937565b60006020828403121561330c578081fd5b5051919050565b600060208284031215613324578081fd5b813561147981613945565b600060208284031215613340578081fd5b815161147981613945565b60006020828403121561335c578081fd5b813567ffffffffffffffff811115613372578182fd5b6125fa84828501613124565b60006020828403121561338f578081fd5b815167ffffffffffffffff8111156133a5578182fd5b8201601f810184136133b5578182fd5b80516133c36130718261379b565b8181528560208385010111156133d7578384fd5b6133e882602083016020860161384a565b95945050505050565b600060208284031215613402578081fd5b5035919050565b6000806040838503121561341b578182fd5b82359150602083013567ffffffffffffffff811115613438578182fd5b613444858286016130a1565b9150509250929050565b60008060408385031215613460578182fd5b82359150602083013567ffffffffffffffff81111561347d578182fd5b61344485828601613124565b6000815180845260208085019450808401835b838110156134b85781518752958201959082019060010161349c565b509495945050505050565b600081518084526134db81602086016020860161384a565b601f01601f19169290920160200192915050565b6000825161350181846020870161384a565b9190910192915050565b600080835482600182811c91508083168061352757607f831692505b602080841082141561354757634e487b7160e01b87526022600452602487fd5b81801561355b576001811461356c57613598565b60ff19861689528489019650613598565b60008a815260209020885b868110156135905781548b820152908501908301613577565b505084890196505b509498975050505050505050565b600083516135b881846020880161384a565b8351908301906135cc81836020880161384a565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613608908301846134c3565b9695505050505050565b6000602082526114796020830184613489565b60006020825261147960208301846134c3565b60208082526021908201527f546f6b656e732068617665206e6f74206265656e2061737369676e65642079656040820152601d60fa1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000838252604060208301526125fa6040830184613489565b604051601f8201601f1916810167ffffffffffffffff811182821017156137935761379361390c565b604052919050565b600067ffffffffffffffff8211156137b5576137b561390c565b50601f01601f191660200190565b600082198211156137d6576137d66138e0565b500190565b600060ff821660ff84168060ff038211156137f8576137f86138e0565b019392505050565b60008261380f5761380f6138f6565b500490565b600081600019048311821515161561382e5761382e6138e0565b500290565b600082821015613845576138456138e0565b500390565b60005b8381101561386557818101518382015260200161384d565b838111156119885750506000910152565b600181811c9082168061388a57607f821691505b602082108114156138ab57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156138c5576138c56138e0565b5060010190565b6000826138db576138db6138f6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461179c57600080fd5b801515811461179c57600080fd5b6001600160e01b03198116811461179c57600080fdfea2646970667358221220b73638248051c24d584167a426bbe66e810b7cb084d9cd9a2feb6a7e4ecfbfeb64736f6c63430008030033608060405234801561001057600080fd5b50604051610d5c380380610d5c83398101604081905261002f91610078565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600255610090565b600060208284031215610089578081fd5b5051919050565b610cbd8061009f6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063cf77cea81161005b578063cf77cea8146100ee578063d9dfc0af14610104578063f2fde38b14610117578063f41d29101461012a57610088565b806362dc2bda1461008d578063715018a6146100b65780638da5cb5b146100c0578063b29d1860146100db575b600080fd5b610098609160f51b81565b6040516001600160f01b031990911681526020015b60405180910390f35b6100be61014a565b005b6000546040516001600160a01b0390911681526020016100ad565b6100be6100e9366004610a3a565b6101c7565b6100f6600081565b6040519081526020016100ad565b6100be610112366004610a8d565b610201565b6100be610125366004610a0c565b610327565b61013d610138366004610a75565b610411565b6040516100ad9190610ad2565b6000546001600160a01b0316331461017d5760405162461bcd60e51b815260040161017490610b25565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146101f15760405162461bcd60e51b815260040161017490610b25565b6001546101fe9082610201565b50565b6000546001600160a01b0316331461022b5760405162461bcd60e51b815260040161017490610b25565b60015482111561023a57600080fd5b60005b8151811015610311576001546102538483610b5a565b1061029e57600182828151811061027a57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018101845560009384529190922001556102ff565b8181815181106102be57634e487b7160e01b600052603260045260246000fd5b6020026020010151600184836102d49190610b5a565b815481106102f257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001555b8061030981610bbc565b91505061023d565b50600254600154111561032357600080fd5b5050565b6000546001600160a01b031633146103515760405162461bcd60e51b815260040161017490610b25565b6001600160a01b0381166103b65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610174565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6060600061122060f01b6001848154811061043c57634e487b7160e01b600052603260045260246000fd5b906000526020600020015460405160200161046d9291906001600160f01b0319929092168252600282015260220190565b6040516020818303038152906040529050600061048982610493565b925050505b919050565b60608151600014156104b4575060408051600081526020810190915261048e565b60408051602e8082526105e08201909252600091602082016105c0803683370190505090506000816000815181106104fc57634e487b7160e01b600052603260045260246000fd5b60ff90921660209283029190910190910152600160005b845181101561066d57600085828151811061053e57634e487b7160e01b600052603260045260246000fd5b016020015160f81c905060005b8360ff168110156105f45784818151811061057657634e487b7160e01b600052603260045260246000fd5b602002602001015160ff1661010061058e9190610b86565b6105989083610b5a565b91506105a5603a83610bf7565b8582815181106105c557634e487b7160e01b600052603260045260246000fd5b60ff909216602092830291909101909101526105e2603a83610b72565b91506105ed81610bbc565b905061054b565b505b801561065c57610607603a82610bf7565b848460ff168151811061062a57634e487b7160e01b600052603260045260246000fd5b60ff909216602092830291909101909101528261064681610bd7565b93506106559050603a82610b72565b90506105f6565b5061066681610bbc565b9050610513565b5061048961068361067e8484610688565b610764565b610853565b606060008260ff1667ffffffffffffffff8111156106b657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156106df578160200160208202803683370190505b50905060005b8360ff1681101561075c5784818151811061071057634e487b7160e01b600052603260045260246000fd5b602002602001015182828151811061073857634e487b7160e01b600052603260045260246000fd5b60ff909216602092830291909101909101528061075481610bbc565b9150506106e5565b509392505050565b60606000825167ffffffffffffffff81111561079057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107b9578160200160208202803683370190505b50905060005b835181101561084c578381600186516107d89190610ba5565b6107e29190610ba5565b8151811061080057634e487b7160e01b600052603260045260246000fd5b602002602001015182828151811061082857634e487b7160e01b600052603260045260246000fd5b60ff909216602092830291909101909101528061084481610bbc565b9150506107bf565b5092915050565b60606000825167ffffffffffffffff81111561087f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156108a9576020820181803683370190505b50905060005b835181101561084c576040518060600160405280603a8152602001610c4e603a91398482815181106108f157634e487b7160e01b600052603260045260246000fd5b602002602001015160ff168151811061091a57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b82828151811061094557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061096681610bbc565b9150506108af565b600082601f83011261097e578081fd5b8135602067ffffffffffffffff8083111561099b5761099b610c37565b8260051b604051601f19603f830116810181811084821117156109c0576109c0610c37565b604052848152838101925086840182880185018910156109de578687fd5b8692505b85831015610a005780358452928401926001929092019184016109e2565b50979650505050505050565b600060208284031215610a1d578081fd5b81356001600160a01b0381168114610a33578182fd5b9392505050565b600060208284031215610a4b578081fd5b813567ffffffffffffffff811115610a61578182fd5b610a6d8482850161096e565b949350505050565b600060208284031215610a86578081fd5b5035919050565b60008060408385031215610a9f578081fd5b82359150602083013567ffffffffffffffff811115610abc578182fd5b610ac88582860161096e565b9150509250929050565b6000602080835283518082850152825b81811015610afe57858101830151858201604001528201610ae2565b81811115610b0f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610b6d57610b6d610c0b565b500190565b600082610b8157610b81610c21565b500490565b6000816000190483118215151615610ba057610ba0610c0b565b500290565b600082821015610bb757610bb7610c0b565b500390565b6000600019821415610bd057610bd0610c0b565b5060010190565b600060ff821660ff811415610bee57610bee610c0b565b60010192915050565b600082610c0657610c06610c21565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fdfe31323334353637383941424344454647484a4b4c4d4e505152535455565758595a6162636465666768696a6b6d6e6f707172737475767778797aa26469706673582212200f4ed59db320989ff2998726f251f3fc97a46a8211a8e8c541de05b2e4e5167e64736f6c63430008030033f7095f60328bed3c44d29fecd62a575c7d133970dc0c35d7121d05051d73dc2d0000000000000000000000002e071bde5f8bbf73079e74b9cc61bfe95af44b1e000000000000000000000000000000000000000000000036ea32f4e55eb4000000000000000000000000000000000000000000000000000000000000609d30e00000000000000000000000000000000000000000000000000000000060a66b6000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000273defdc79b9944ecfad117454ec5ba3e65a0d87000000000000000000000000ba29c00dd68a086dc42303bf7094e6ad01e5b4ce00000000000000000000000068a99f89e475a078645f4bac491360afe255dff10000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002
Deployed Bytecode
0x6080604052600436106102975760003560e01c80638b83209b1161015a578063c6ab67a3116100c1578063e36d64981161007a578063e36d649814610803578063e985e9c514610818578063f2fde38b14610861578063f41d291014610881578063f62f3c11146108a1578063fb107a4f146108b6576102e7565b8063c6ab67a31461074e578063c87b56dd14610763578063cb774d4714610783578063ce7c2ac214610798578063d9dfc0af146107ce578063e33b7de3146107ee576102e7565b8063a0d44c4a11610113578063a0d44c4a14610689578063a22cb4651461069e578063b29d1860146106be578063b88d4fde146106de578063bc28d702146106fe578063c39cbef11461072e576102e7565b80638b83209b146105cd5780638da5cb5b146105ed57806395d89b411461060b5780639852595c1461062057806398ba8ebf14610656578063a0712d6814610676576102e7565b806332cb6b0c116101fe5780636352211e116101b75780636352211e1461052557806370a0823114610545578063715018a61461056557806374df39c91461057a5780637de55fe11461058f57806385aa92a7146105af576102e7565b806332cb6b0c146104905780633a98ef39146104a65780633c276d86146104bb57806342842e0e146104d057806345ca7738146104f05780634f6ccce714610505576102e7565b8063191655871161025057806319165587146103dc5780631c1475be146103fc57806323b872dd1461041a5780632f745c591461043a578063310495ab1461045a57806331a53e9a1461047a576102e7565b806301ffc9a7146102ec57806306fdde0314610321578063081812fc14610343578063095ea7b31461037b57806315b56d101461039d57806318160ddd146103bd576102e7565b366102e7577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706102c56108cb565b604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102f857600080fd5b5061030c610307366004613313565b6108d0565b60405190151581526020015b60405180910390f35b34801561032d57600080fd5b506103366108fd565b6040516103189190613625565b34801561034f57600080fd5b5061036361035e3660046133f1565b61098f565b6040516001600160a01b039091168152602001610318565b34801561038757600080fd5b5061039b610396366004613281565b610a29565b005b3480156103a957600080fd5b5061030c6103b836600461334b565b610b51565b3480156103c957600080fd5b506009545b604051908152602001610318565b3480156103e857600080fd5b5061039b6103f7366004613143565b610b85565b34801561040857600080fd5b50601b546001600160a01b0316610363565b34801561042657600080fd5b5061039b610435366004613197565b610d56565b34801561044657600080fd5b506103ce610455366004613281565b610d8e565b34801561046657600080fd5b506103366104753660046133f1565b610e24565b34801561048657600080fd5b506103ce61070d81565b34801561049c57600080fd5b506103ce613f4881565b3480156104b257600080fd5b50600b546103ce565b3480156104c757600080fd5b506012546103ce565b3480156104dc57600080fd5b5061039b6104eb366004613197565b610ec6565b3480156104fc57600080fd5b506011546103ce565b34801561051157600080fd5b506103ce6105203660046133f1565b610ee1565b34801561053157600080fd5b506103636105403660046133f1565b610f82565b34801561055157600080fd5b506103ce610560366004613143565b610ff9565b34801561057157600080fd5b5061039b611080565b34801561058657600080fd5b5061039b611113565b34801561059b57600080fd5b5061039b6105aa366004613281565b611215565b3480156105bb57600080fd5b50601c546001600160a01b0316610363565b3480156105d957600080fd5b506103636105e83660046133f1565b61138f565b3480156105f957600080fd5b506000546001600160a01b0316610363565b34801561061757600080fd5b506103366113cd565b34801561062c57600080fd5b506103ce61063b366004613143565b6001600160a01b03166000908152600e602052604090205490565b34801561066257600080fd5b506103366106713660046133f1565b6113dc565b61039b6106843660046133f1565b611480565b34801561069557600080fd5b506016546103ce565b3480156106aa57600080fd5b5061039b6106b9366004613254565b61179f565b3480156106ca57600080fd5b5061039b6106d93660046132ac565b6118a1565b3480156106ea57600080fd5b5061039b6106f93660046131d7565b61194f565b34801561070a57600080fd5b5061030c6107193660046133f1565b6000908152601a602052604090205460ff1690565b34801561073a57600080fd5b5061039b61074936600461344e565b61198e565b34801561075a57600080fd5b506010546103ce565b34801561076f57600080fd5b5061033661077e3660046133f1565b611dcc565b34801561078f57600080fd5b506015546103ce565b3480156107a457600080fd5b506103ce6107b3366004613143565b6001600160a01b03166000908152600d602052604090205490565b3480156107da57600080fd5b5061039b6107e9366004613409565b611e85565b3480156107fa57600080fd5b50600c546103ce565b34801561080f57600080fd5b506014546103ce565b34801561082457600080fd5b5061030c61083336600461315f565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561086d57600080fd5b5061039b61087c366004613143565b611f36565b34801561088d57600080fd5b5061033661089c3660046133f1565b61203f565b3480156108ad57600080fd5b506013546103ce565b3480156108c257600080fd5b506103ce6120c0565b335b90565b60006001600160e01b0319821663780e9d6360e01b14806108f557506108f58261216f565b90505b919050565b60606001805461090c90613876565b80601f016020809104026020016040519081016040528092919081815260200182805461093890613876565b80156109855780601f1061095a57610100808354040283529160200191610985565b820191906000526020600020905b81548152906001019060200180831161096857829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a3482610f82565b9050806001600160a01b0316836001600160a01b03161415610aa25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a04565b806001600160a01b0316610ab46108cb565b6001600160a01b03161480610ad05750610ad0816108336108cb565b610b425760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a04565b610b4c83836121bf565b505050565b60006019610b5e8361222d565b604051610b6b91906134ef565b9081526040519081900360200190205460ff169050919050565b6001600160a01b0381166000908152600d6020526040902054610bf95760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610a04565b6000600c5447610c0991906137c3565b6001600160a01b0383166000908152600e6020908152604080832054600b54600d909352908320549394509192610c409085613814565b610c4a9190613800565b610c549190613833565b905080610cb75760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a04565b6001600160a01b0383166000908152600e6020526040902054610cdb9082906137c3565b6001600160a01b0384166000908152600e6020526040902055600c54610d029082906137c3565b600c55610d0f83826123f2565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610d67610d616108cb565b8261250b565b610d835760405162461bcd60e51b8152600401610a0490613700565b610b4c838383612602565b6000610d9983610ff9565b8210610dfb5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a04565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000818152601860205260409020805460609190610e4190613876565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6d90613876565b8015610eba5780601f10610e8f57610100808354040283529160200191610eba565b820191906000526020600020905b815481529060010190602001808311610e9d57829003601f168201915b50505050509050919050565b610b4c8383836040518060200160405280600081525061194f565b6000610eec60095490565b8210610f4f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a04565b60098281548110610f7057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600360205260408120546001600160a01b0316806108f55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a04565b60006001600160a01b0382166110645760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a04565b506001600160a01b031660009081526004602052604090205490565b6110886108cb565b6001600160a01b03166110a36000546001600160a01b031690565b6001600160a01b0316146110c95760405162461bcd60e51b8152600401610a04906136cb565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b601554156111635760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610a04565b6014546111b25760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206d757374206265207365746044820152606401610a04565b6014546111c390613f4890406138cc565b60155560145460ff906111d79043906127ad565b11156111fa57613f486111eb600143613833565b6111f69190406138cc565b6015555b6015546112135760155461120f9060016127b9565b6015555b565b61121d6108cb565b6001600160a01b03166112386000546001600160a01b031690565b6001600160a01b03161461125e5760405162461bcd60e51b8152600401610a04906136cb565b613f486112748261126e60095490565b906127b9565b11156112c25760405162461bcd60e51b815260206004820152601a60248201527f45786365656473206d617820737570706c79206f66204e4654730000000000006044820152606401610a04565b60175461070d906112d390836127b9565b11156113215760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206e756d206f66207265736572766564204e4654736044820152606401610a04565b60005b81811015610b4c57600061133760095490565b905060135442101561135d576000818152601a60205260409020805460ff191660011790555b6017805490600061136d836138b1565b919050555061137c84826127c5565b5080611387816138b1565b915050611324565b6000600f82815481106113b257634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b60606002805461090c90613876565b60606000601554116114005760405162461bcd60e51b8152600401610a0490613638565b600061140b8361203f565b90506000611433604080518082019091526007815266697066733a2f2f60c81b602082015290565b9050805160001415611447575090506108f8565b8151156114795780826040516020016114619291906135a6565b604051602081830303815290604052925050506108f8565b9392505050565b6012544210156114c95760405162461bcd60e51b815260206004820152601460248201527314d85b19481a185cc81b9bdd081cdd185c9d195960621b6044820152606401610a04565b613f486114d560095490565b1061151b5760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc8185b1c9958591e48195b99195960521b6044820152606401610a04565b6000811161155f5760405162461bcd60e51b815260206004820152601160248201527043616e6e6f74206275792030204e46547360781b6044820152606401610a04565b60148111156115c25760405162461bcd60e51b815260206004820152602960248201527f596f75206d6179206e6f7420627579206d6f7265207468616e203230204e465460448201526873206174206f6e636560b81b6064820152608401610a04565b6115d0613f4861070d6127ad565b6016546115dd90836127b9565b11156116375760405162461bcd60e51b815260206004820152602360248201527f45786365656473206d6178206e756d626572206f662073656c6c61626c65204e60448201526246547360e81b6064820152608401610a04565b3461164a826116446120c0565b906127e3565b146116975760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a04565b60005b818110156117665760006116ad60095490565b6016805491925060006116bf836138b1565b9190505550613f4881106117255760405162461bcd60e51b815260206004820152602760248201527f45786365656473206d6178206e756d626572206f66204e46547320696e206578604482015266697374656e636560c81b6064820152608401610a04565b601354421015611749576000818152601a60205260409020805460ff191660011790555b61175333826127c5565b508061175e816138b1565b91505061169a565b506014541580156117925750611780613f4861070d6127ad565b60165410158061179257506013544210155b1561179c57436014555b50565b6117a76108cb565b6001600160a01b0316826001600160a01b031614156118085760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a04565b80600660006118156108cb565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556118596108cb565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611895911515815260200190565b60405180910390a35050565b6118a96108cb565b6001600160a01b03166118c46000546001600160a01b031690565b6001600160a01b0316146118ea5760405162461bcd60e51b8152600401610a04906136cb565b601c54604051630594e8c360e51b81526001600160a01b039091169063b29d18609061191a908490600401613612565b600060405180830381600087803b15801561193457600080fd5b505af1158015611948573d6000803e3d6000fd5b5050505050565b61196061195a6108cb565b8361250b565b61197c5760405162461bcd60e51b8152600401610a0490613700565b611988848484846127ef565b50505050565b600061199983610f82565b9050806001600160a01b03166119ad6108cb565b6001600160a01b031614611a035760405162461bcd60e51b815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e6572006044820152606401610a04565b611a0c82612822565b1515600114611a545760405162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b6044820152606401610a04565b600083815260186020526040908190209051600291611a729161350b565b602060405180830381855afa158015611a8f573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611ab291906132fb565b600283604051611ac291906134ef565b602060405180830381855afa158015611adf573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190611b0291906132fb565b1415611b5c5760405162461bcd60e51b815260206004820152602360248201527f4e6577206e616d652069732073616d65206173207468652063757272656e74206044820152626f6e6560e81b6064820152608401610a04565b611b6582610b51565b15611baa5760405162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b6044820152606401610a04565b601b546011546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015611c0057600080fd5b505af1158015611c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3891906132df565b5060008381526018602052604081208054611c5290613876565b90501115611cfd5760008381526018602052604090208054611cfd9190611c7890613876565b80601f0160208091040260200160405190810160405280929190818152602001828054611ca490613876565b8015611cf15780601f10611cc657610100808354040283529160200191611cf1565b820191906000526020600020905b815481529060010190602001808311611cd457829003601f168201915b50505050506000612a6f565b611d08826001612a6f565b60008381526018602090815260409091208351611d2792850190612fca565b50601b54601154604051630852cd8d60e31b81526001600160a01b03909216916342966c6891611d5d9160040190815260200190565b600060405180830381600087803b158015611d7757600080fd5b505af1158015611d8b573d6000803e3d6000fd5b50505050827f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b83604051611dbf9190613625565b60405180910390a2505050565b6000818152600360205260409020546060906001600160a01b0316611e4d5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a04565b600060155411611e6f5760405162461bcd60e51b8152600401610a0490613638565b6000611e7a83612aac565b9050611479816113dc565b611e8d6108cb565b6001600160a01b0316611ea86000546001600160a01b031690565b6001600160a01b031614611ece5760405162461bcd60e51b8152600401610a04906136cb565b601c5460405163d9dfc0af60e01b81526001600160a01b039091169063d9dfc0af90611f009085908590600401613751565b600060405180830381600087803b158015611f1a57600080fd5b505af1158015611f2e573d6000803e3d6000fd5b505050505050565b611f3e6108cb565b6001600160a01b0316611f596000546001600160a01b031690565b6001600160a01b031614611f7f5760405162461bcd60e51b8152600401610a04906136cb565b6001600160a01b038116611fe45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a04565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b601c54604051630f41d29160e41b8152600481018390526060916001600160a01b03169063f41d29109060240160006040518083038186803b15801561208457600080fd5b505afa158015612098573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108f5919081019061337e565b600061032060165410156120dc5750662386f26fc100006108cd565b61113060165410156120f6575066470de4df8200006108cd565b61226060165410156121105750666a94d74f4300006108cd565b613138601654101561212a575066b1a2bc2ec500006108cd565b6136d86016541015612145575067016345785d8a00006108cd565b61383860165410156121605750670429d069189e00006108cd565b50670de0b6b3a76400006108cd565b60006001600160e01b031982166380ac58cd60e01b14806121a057506001600160e01b03198216635b5e139f60e01b145b806108f557506301ffc9a760e01b6001600160e01b03198316146108f5565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121f482610f82565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b606060008290506000815167ffffffffffffffff81111561225e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612288576020820181803683370190505b50905060005b82518110156123ea5760418382815181106122b957634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906122f75750605a8382815181106122ec57634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b156123755782818151811061231c57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b60f81c602061233691906137db565b60f81b82828151811061235957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506123d8565b82818151811061239557634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b8282815181106123c057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505b806123e2816138b1565b91505061228e565b509392505050565b804710156124425760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a04565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461248f576040519150601f19603f3d011682016040523d82523d6000602084013e612494565b606091505b5050905080610b4c5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a04565b6000818152600360205260408120546001600160a01b03166125845760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a04565b600061258f83610f82565b9050806001600160a01b0316846001600160a01b031614806125ca5750836001600160a01b03166125bf8461098f565b6001600160a01b0316145b806125fa57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661261582610f82565b6001600160a01b03161461267d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a04565b6001600160a01b0382166126df5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a04565b6126ea838383612ac9565b6126f56000826121bf565b6001600160a01b038316600090815260046020526040812080546001929061271e908490613833565b90915550506001600160a01b038216600090815260046020526040812080546001929061274c9084906137c3565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006114798284613833565b600061147982846137c3565b6127df828260405180602001604052806000815250612b86565b5050565b60006114798284613814565b6127fa848484612602565b61280684848484612bb9565b6119885760405162461bcd60e51b8152600401610a0490613679565b60008082905060018151101561283c5760009150506108f8565b6032815111156128505760009150506108f8565b8060008151811061287157634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156128965760009150506108f8565b80600182516128a59190613833565b815181106128c357634e487b7160e01b600052603260045260246000fd5b6020910101516001600160f81b031916600160fd1b14156128e85760009150506108f8565b60008160008151811061290b57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916905060005b8251811015612a6457600083828151811061294a57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160fd1b8114801561297b5750600160fd1b6001600160f81b03198416145b1561298d5760009450505050506108f8565b600360fc1b6001600160f81b03198216108015906129b95750603960f81b6001600160f81b0319821611155b1580156129ef5750604160f81b6001600160f81b03198216108015906129ed5750602d60f91b6001600160f81b0319821611155b155b8015612a245750606160f81b6001600160f81b0319821610801590612a225750603d60f91b6001600160f81b0319821611155b155b8015612a3e5750600160fd1b6001600160f81b0319821614155b15612a505760009450505050506108f8565b915080612a5c816138b1565b91505061291f565b506001949350505050565b806019612a7b8461222d565b604051612a8891906134ef565b908152604051908190036020019020805491151560ff199092169190911790555050565b6000613f4860155483612abf91906137c3565b6108f591906138cc565b6001600160a01b038316612b2457612b1f81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b612b47565b816001600160a01b0316836001600160a01b031614612b4757612b478382612cc2565b6001600160a01b038216612b6357612b5e81612d5f565b610b4c565b826001600160a01b0316826001600160a01b031614610b4c57610b4c8282612e38565b612b908383612e7c565b612b9d6000848484612bb9565b610b4c5760405162461bcd60e51b8152600401610a0490613679565b60006001600160a01b0384163b15612a6457836001600160a01b031663150b7a02612be26108cb565b8786866040518563ffffffff1660e01b8152600401612c0494939291906135d5565b602060405180830381600087803b158015612c1e57600080fd5b505af1925050508015612c4e575060408051601f3d908101601f19168201909252612c4b9181019061332f565b60015b612ca8573d808015612c7c576040519150601f19603f3d011682016040523d82523d6000602084013e612c81565b606091505b508051612ca05760405162461bcd60e51b8152600401610a0490613679565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506125fa565b60006001612ccf84610ff9565b612cd99190613833565b600083815260086020526040902054909150808214612d2c576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b600954600090612d7190600190613833565b6000838152600a602052604081205460098054939450909284908110612da757634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060098381548110612dd657634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a90915260408082208490558582528120556009805480612e1c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612e4383610ff9565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b6001600160a01b038216612ed25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a04565b6000818152600360205260409020546001600160a01b031615612f375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a04565b612f4360008383612ac9565b6001600160a01b0382166000908152600460205260408120805460019290612f6c9084906137c3565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612fd690613876565b90600052602060002090601f016020900481019282612ff8576000855561303e565b82601f1061301157805160ff191683800117855561303e565b8280016001018555821561303e579182015b8281111561303e578251825591602001919060010190613023565b5061304a92915061304e565b5090565b5b8082111561304a576000815560010161304f565b60006130766130718461379b565b61376a565b905082815283838301111561308a57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126130b1578081fd5b8135602067ffffffffffffffff8211156130cd576130cd61390c565b8160051b6130dc82820161376a565b8381528281019086840183880185018910156130f6578687fd5b8693505b858410156131185780358352600193909301929184019184016130fa565b50979650505050505050565b600082601f830112613134578081fd5b61147983833560208501613063565b600060208284031215613154578081fd5b813561147981613922565b60008060408385031215613171578081fd5b823561317c81613922565b9150602083013561318c81613922565b809150509250929050565b6000806000606084860312156131ab578081fd5b83356131b681613922565b925060208401356131c681613922565b929592945050506040919091013590565b600080600080608085870312156131ec578081fd5b84356131f781613922565b9350602085013561320781613922565b925060408501359150606085013567ffffffffffffffff811115613229578182fd5b8501601f81018713613239578182fd5b61324887823560208401613063565b91505092959194509250565b60008060408385031215613266578182fd5b823561327181613922565b9150602083013561318c81613937565b60008060408385031215613293578182fd5b823561329e81613922565b946020939093013593505050565b6000602082840312156132bd578081fd5b813567ffffffffffffffff8111156132d3578182fd5b6125fa848285016130a1565b6000602082840312156132f0578081fd5b815161147981613937565b60006020828403121561330c578081fd5b5051919050565b600060208284031215613324578081fd5b813561147981613945565b600060208284031215613340578081fd5b815161147981613945565b60006020828403121561335c578081fd5b813567ffffffffffffffff811115613372578182fd5b6125fa84828501613124565b60006020828403121561338f578081fd5b815167ffffffffffffffff8111156133a5578182fd5b8201601f810184136133b5578182fd5b80516133c36130718261379b565b8181528560208385010111156133d7578384fd5b6133e882602083016020860161384a565b95945050505050565b600060208284031215613402578081fd5b5035919050565b6000806040838503121561341b578182fd5b82359150602083013567ffffffffffffffff811115613438578182fd5b613444858286016130a1565b9150509250929050565b60008060408385031215613460578182fd5b82359150602083013567ffffffffffffffff81111561347d578182fd5b61344485828601613124565b6000815180845260208085019450808401835b838110156134b85781518752958201959082019060010161349c565b509495945050505050565b600081518084526134db81602086016020860161384a565b601f01601f19169290920160200192915050565b6000825161350181846020870161384a565b9190910192915050565b600080835482600182811c91508083168061352757607f831692505b602080841082141561354757634e487b7160e01b87526022600452602487fd5b81801561355b576001811461356c57613598565b60ff19861689528489019650613598565b60008a815260209020885b868110156135905781548b820152908501908301613577565b505084890196505b509498975050505050505050565b600083516135b881846020880161384a565b8351908301906135cc81836020880161384a565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613608908301846134c3565b9695505050505050565b6000602082526114796020830184613489565b60006020825261147960208301846134c3565b60208082526021908201527f546f6b656e732068617665206e6f74206265656e2061737369676e65642079656040820152601d60fa1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000838252604060208301526125fa6040830184613489565b604051601f8201601f1916810167ffffffffffffffff811182821017156137935761379361390c565b604052919050565b600067ffffffffffffffff8211156137b5576137b561390c565b50601f01601f191660200190565b600082198211156137d6576137d66138e0565b500190565b600060ff821660ff84168060ff038211156137f8576137f86138e0565b019392505050565b60008261380f5761380f6138f6565b500490565b600081600019048311821515161561382e5761382e6138e0565b500290565b600082821015613845576138456138e0565b500390565b60005b8381101561386557818101518382015260200161384d565b838111156119885750506000910152565b600181811c9082168061388a57607f821691505b602082108114156138ab57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156138c5576138c56138e0565b5060010190565b6000826138db576138db6138f6565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461179c57600080fd5b801515811461179c57600080fd5b6001600160e01b03198116811461179c57600080fdfea2646970667358221220b73638248051c24d584167a426bbe66e810b7cb084d9cd9a2feb6a7e4ecfbfeb64736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
f7095f60328bed3c44d29fecd62a575c7d133970dc0c35d7121d05051d73dc2d0000000000000000000000002e071bde5f8bbf73079e74b9cc61bfe95af44b1e000000000000000000000000000000000000000000000036ea32f4e55eb4000000000000000000000000000000000000000000000000000000000000609d30e00000000000000000000000000000000000000000000000000000000060a66b6000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000003000000000000000000000000273defdc79b9944ecfad117454ec5ba3e65a0d87000000000000000000000000ba29c00dd68a086dc42303bf7094e6ad01e5b4ce00000000000000000000000068a99f89e475a078645f4bac491360afe255dff10000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002
-----Decoded View---------------
Arg [0] : provenanceHash_ (bytes32): 0xf7095f60328bed3c44d29fecd62a575c7d133970dc0c35d7121d05051d73dc2d
Arg [1] : m26Address_ (address): 0x2e071BDE5f8bbf73079e74b9cC61BFe95AF44B1E
Arg [2] : nameChangePrice_ (uint256): 1013000000000000000000
Arg [3] : saleStartTimestamp_ (uint256): 1620914400
Arg [4] : revealTimestamp_ (uint256): 1621519200
Arg [5] : payees (address[]): 0x273DefdC79b9944EcFAD117454EC5Ba3e65a0D87,0xba29C00DD68A086DC42303Bf7094E6AD01E5b4CE,0x68A99f89E475a078645f4BAC491360aFe255Dff1
Arg [6] : shares_ (uint256[]): 4,4,2
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : f7095f60328bed3c44d29fecd62a575c7d133970dc0c35d7121d05051d73dc2d
Arg [1] : 0000000000000000000000002e071bde5f8bbf73079e74b9cc61bfe95af44b1e
Arg [2] : 000000000000000000000000000000000000000000000036ea32f4e55eb40000
Arg [3] : 00000000000000000000000000000000000000000000000000000000609d30e0
Arg [4] : 0000000000000000000000000000000000000000000000000000000060a66b60
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 000000000000000000000000273defdc79b9944ecfad117454ec5ba3e65a0d87
Arg [9] : 000000000000000000000000ba29c00dd68a086dc42303bf7094e6ad01e5b4ce
Arg [10] : 00000000000000000000000068a99f89e475a078645f4bac491360afe255dff1
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000002
Loading...
Loading
Loading...
Loading
OVERVIEW
Mars NFTs are personal, unique pieces of scarce space art with utility. Each NFT represents a unique 2-by-2 degree surface area of the red planet that allows its holder to showcase NFTs and receive M26 until 2026, the year Elon predicts humans on Mars.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.