ERC-20
Overview
Max Total Supply
275,711.028356481481481448 M26
Holders
10
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Mars26
Compiler Version
v0.8.3+commit.8d00100c
Optimization Enabled:
No 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/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 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 "../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 "../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 "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import './Mars26.sol'; import './MarsStorage.sol'; /** * @title Mars contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract Mars is Ownable, ERC721Enumerable { using SafeMath for uint256; bytes32 private _provenanceHash; uint256 internal _maxSupply; uint256 private _nameChangePrice; uint256 private _saleStartTimestamp; uint256 private _revealTimestamp; uint256[6] private _priceIntervalSupplyLimits; uint256 private _startingIndexBlock; uint256 internal _startingIndex; 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_, uint256 maxSupply_, uint256[6] memory priceIntervalSupplyLimits_ ) ERC721("Mars", "MARS") { _provenanceHash = provenanceHash_; _m26 = Mars26(m26Address_); _nameChangePrice = nameChangePrice_; _saleStartTimestamp = saleStartTimestamp_; _revealTimestamp = revealTimestamp_; for (uint i = 1; i < priceIntervalSupplyLimits_.length; i++) { require( priceIntervalSupplyLimits_[i - 1] < priceIntervalSupplyLimits_[i], "Price intervale supply limit need to ascending" ); } _priceIntervalSupplyLimits = priceIntervalSupplyLimits_; _maxSupply = maxSupply_; _storage = new MarsStorage(maxSupply_); } /** * @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 max number of NFTs that can be minted. */ function maxSupply() public view returns (uint256) { return _maxSupply; } /** * @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 set upper supply limits which determine the NFT price during sale. */ function priceIntervalSupplyLimits() public view returns (uint256[6] memory) { return _priceIntervalSupplyLimits; } /** * @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 minted tokens. */ function getNFTPrice() public view returns (uint256) { uint currentSupply = totalSupply(); if (currentSupply < _priceIntervalSupplyLimits[0]) { return 0.05 ether; } else if (currentSupply < _priceIntervalSupplyLimits[1]) { return 0.1 ether; } else if (currentSupply < _priceIntervalSupplyLimits[2]) { return 0.2 ether; } else if (currentSupply < _priceIntervalSupplyLimits[3]) { return 0.4 ether; } else if (currentSupply < _priceIntervalSupplyLimits[4]) { return 1 ether; } else if (currentSupply < _priceIntervalSupplyLimits[5]) { return 3 ether; } else { return 26 ether; } } /** * @dev Mints Mars NFTs */ function mintNFT(uint256 numberOfNfts) public payable { require(block.timestamp >= _saleStartTimestamp, "Sale has not started"); require(totalSupply() < _maxSupply, "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(totalSupply().add(numberOfNfts) <= _maxSupply, "Exceeds max number of NFTs in existence"); require(getNFTPrice().mul(numberOfNfts) == msg.value, "Ether value sent is not correct"); for (uint i = 0; i < numberOfNfts; i++) { uint mintIndex = totalSupply(); require(mintIndex < _maxSupply, "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 && (totalSupply() == _maxSupply || block.timestamp >= _revealTimestamp)) { _startingIndexBlock = block.number; } } /** * @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)) % _maxSupply; // 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)) % _maxSupply; } // 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 Withdraw ether from this contract (Callable by owner) */ function withdraw() onlyOwner public { uint balance = address(this).balance; payable(msg.sender).transfer(balance); } /** * @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) % _maxSupply; } }
// 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 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 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); }
// 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 "@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 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); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"emissionStartTimestamp_","type":"uint256"},{"internalType":"uint256","name":"emissionEndTimestamp_","type":"uint256"},{"internalType":"uint256","name":"emissionPerDay_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"INITIAL_ALLOTMENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRE_REVEAL_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"name":"accumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIndices","type":"uint256[]"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emissionEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emissionPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emissionStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"name":"lastClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"marsAddress_","type":"address"}],"name":"setMarsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200376538038062003765833981810160405281019062000037919062000275565b6040518060400160405280600681526020017f4d617273323600000000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f4d323600000000000000000000000000000000000000000000000000000000008152508160039080519060200190620000bb929190620001ae565b508060049080519060200190620000d4929190620001ae565b5050506000620000e9620001a660201b60201c565b905080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35082600681905550816007819055508060088190555050505062000354565b600033905090565b828054620001bc90620002d5565b90600052602060002090601f016020900481019282620001e057600085556200022c565b82601f10620001fb57805160ff19168380011785556200022c565b828001600101855582156200022c579182015b828111156200022b5782518255916020019190600101906200020e565b5b5090506200023b91906200023f565b5090565b5b808211156200025a57600081600090555060010162000240565b5090565b6000815190506200026f816200033a565b92915050565b6000806000606084860312156200028b57600080fd5b60006200029b868287016200025e565b9350506020620002ae868287016200025e565b9250506040620002c1868287016200025e565b9150509250925092565b6000819050919050565b60006002820490506001821680620002ee57607f821691505b602082108114156200030557620003046200030b565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6200034581620002cb565b81146200035157600080fd5b50565b61340180620003646000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c806379b8ac8a116100de578063a9059cbb11610097578063c607cde711610071578063c607cde71461049d578063dd62ed3e146104cd578063e90dfb5f146104fd578063f2fde38b1461051b5761018e565b8063a9059cbb14610433578063aba757f214610463578063b551b82f1461047f5761018e565b806379b8ac8a1461036f57806379cc67901461038d5780638da5cb5b146103a9578063928992ed146103c757806395d89b41146103e5578063a457c2d7146104035761018e565b8063395093511161014b5780636ba4c138116101255780636ba4c138146102e757806370a0823114610317578063715018a61461034757806373422b31146103515761018e565b8063395093511461026b5780633d3728b51461029b57806342966c68146102cb5761018e565b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101e157806323b872dd146101ff578063313ce5671461022f578063367df1651461024d575b600080fd5b61019b610537565b6040516101a8919061282f565b60405180910390f35b6101cb60048036038101906101c691906123d0565b6105c9565b6040516101d89190612814565b60405180910390f35b6101e96105e7565b6040516101f69190612ad1565b60405180910390f35b61021960048036038101906102149190612381565b6105f1565b6040516102269190612814565b60405180910390f35b6102376106f2565b6040516102449190612aec565b60405180910390f35b6102556106fb565b6040516102629190612ad1565b60405180910390f35b610285600480360381019061028091906123d0565b610708565b6040516102929190612814565b60405180910390f35b6102b560048036038101906102b09190612476565b6107b4565b6040516102c29190612ad1565b60405180910390f35b6102e560048036038101906102e09190612476565b6109f5565b005b61030160048036038101906102fc919061240c565b610a09565b60405161030e9190612ad1565b60405180910390f35b610331600480360381019061032c91906122f3565b610ea9565b60405161033e9190612ad1565b60405180910390f35b61034f610ef1565b005b61035961102e565b6040516103669190612ad1565b60405180910390f35b610377611033565b6040516103849190612ad1565b60405180910390f35b6103a760048036038101906103a291906123d0565b61103d565b005b6103b16110c1565b6040516103be91906127f9565b60405180910390f35b6103cf6110eb565b6040516103dc91906127f9565b60405180910390f35b6103ed611115565b6040516103fa919061282f565b60405180910390f35b61041d600480360381019061041891906123d0565b6111a7565b60405161042a9190612814565b60405180910390f35b61044d600480360381019061044891906123d0565b61129b565b60405161045a9190612814565b60405180910390f35b61047d600480360381019061047891906122f3565b6112b9565b005b61048761140a565b6040516104949190612ad1565b60405180910390f35b6104b760048036038101906104b29190612476565b611414565b6040516104c49190612ad1565b60405180910390f35b6104e760048036038101906104e29190612345565b6117e0565b6040516104f49190612ad1565b60405180910390f35b610505611867565b6040516105129190612ad1565b60405180910390f35b610535600480360381019061053091906122f3565b611871565b005b60606003805461054690612d11565b80601f016020809104026020016040519081016040528092919081815260200182805461057290612d11565b80156105bf5780601f10610594576101008083540402835291602001916105bf565b820191906000526020600020905b8154815290600101906020018083116105a257829003601f168201915b5050505050905090565b60006105dd6105d6611a1d565b8484611a25565b6001905092915050565b6000600254905090565b60006105fe848484611bf0565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610649611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156106c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c090612971565b60405180910390fd5b6106e6856106d5611a1d565b85846106e19190612c55565b611a25565b60019150509392505050565b60006012905090565b686dd465e9cabd68000081565b60006107aa610715611a1d565b848460016000610723611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546107a59190612b74565b611a25565b6001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016108289190612ad1565b60206040518083038186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610878919061231c565b73ffffffffffffffffffffffffffffffffffffffff1614156108cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c690612931565b60405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561093757600080fd5b505afa15801561094b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096f919061249f565b82106109b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a790612891565b60405180910390fd5b600080600960008581526020019081526020016000205414156109d5576006546109ea565b60096000848152602001908152602001600020545b905080915050919050565b610a06610a00611a1d565b82611e6f565b50565b60006006544211610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4690612a11565b60405180910390fd5b6000805b8351811015610e2457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac457600080fd5b505afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afc919061249f565b848281518110610b35577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015110610b7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7490612891565b60405180910390fd5b6000600182610b8c9190612b74565b90505b8451811015610c6e57848181518110610bd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151858381518110610c12577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101511415610c5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5290612951565b60405180910390fd5b8080610c6690612d74565b915050610b8f565b506000848281518110610caa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190503373ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610d269190612ad1565b60206040518083038186803b158015610d3e57600080fd5b505afa158015610d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d76919061231c565b73ffffffffffffffffffffffffffffffffffffffff1614610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc3906129d1565b60405180910390fd5b6000610dd782611414565b905060008114610e0f57610df4818561204390919063ffffffff16565b93504260096000848152602001908152602001600020819055505b50508080610e1c90612d74565b915050610a53565b506000811415610e69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6090612a71565b60405180910390fd5b610e733382612059565b610e9f600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682610708565b5080915050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ef9611a1d565b73ffffffffffffffffffffffffffffffffffffffff16610f176110c1565b73ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6490612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600281565b6000600754905090565b60006110508361104b611a1d565b6117e0565b905081811015611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c906129b1565b60405180910390fd5b6110b2836110a1611a1d565b84846110ad9190612c55565b611a25565b6110bc8383611e6f565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461112490612d11565b80601f016020809104026020016040519081016040528092919081815260200182805461115090612d11565b801561119d5780601f106111725761010080835404028352916020019161119d565b820191906000526020600020905b81548152906001019060200180831161118057829003601f168201915b5050505050905090565b600080600160006111b6611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126a90612a91565b60405180910390fd5b61129061127e611a1d565b85858461128b9190612c55565b611a25565b600191505092915050565b60006112af6112a8611a1d565b8484611bf0565b6001905092915050565b6112c1611a1d565b73ffffffffffffffffffffffffffffffffffffffff166112df6110c1565b73ffffffffffffffffffffffffffffffffffffffff1614611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bd90612911565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600854905090565b6000600654421161145a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145190612a11565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016114cd9190612ad1565b60206040518083038186803b1580156114e557600080fd5b505afa1580156114f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151d919061231c565b73ffffffffffffffffffffffffffffffffffffffff161415611574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156b90612931565b60405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115dc57600080fd5b505afa1580156115f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611614919061249f565b8210611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c90612891565b60405180910390fd5b6000611660836107b4565b905060075481106116755760009150506117db565b600060075442106116885760075461168a565b425b905060006116ca620151806116bc6008546116ae87876121ad90919063ffffffff16565b6121c390919063ffffffff16565b6121d990919063ffffffff16565b90506006548314156117d457600060011515600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bc28d702886040518263ffffffff1660e01b81526004016117379190612ad1565b60206040518083038186803b15801561174f57600080fd5b505afa158015611763573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611787919061244d565b15151461179d57686dd465e9cabd6800006117bb565b6117ba6002686dd465e9cabd6800006121c390919063ffffffff16565b5b90506117d0818361204390919063ffffffff16565b9150505b8093505050505b919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600654905090565b611879611a1d565b73ffffffffffffffffffffffffffffffffffffffff166118976110c1565b73ffffffffffffffffffffffffffffffffffffffff16146118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e490612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906128b1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c90612a51565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afc906128d1565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611be39190612ad1565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5790612a31565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611cd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc790612851565b60405180910390fd5b611cdb8383836121ef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d58906128f1565b60405180910390fd5b8181611d6d9190612c55565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611dfd9190612b74565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611e619190612ad1565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed6906129f1565b60405180910390fd5b611eeb826000836121ef565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6890612871565b60405180910390fd5b8181611f7d9190612c55565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254611fd19190612c55565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516120369190612ad1565b60405180910390a3505050565b600081836120519190612b74565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c090612ab1565b60405180910390fd5b6120d5600083836121ef565b80600260008282546120e79190612b74565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461213c9190612b74565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121a19190612ad1565b60405180910390a35050565b600081836121bb9190612c55565b905092915050565b600081836121d19190612bfb565b905092915050565b600081836121e79190612bca565b905092915050565b505050565b600061220761220284612b2c565b612b07565b9050808382526020820190508285602086028201111561222657600080fd5b60005b85811015612256578161223c88826122c9565b845260208401935060208301925050600181019050612229565b5050509392505050565b60008135905061226f81613386565b92915050565b60008151905061228481613386565b92915050565b600082601f83011261229b57600080fd5b81356122ab8482602086016121f4565b91505092915050565b6000815190506122c38161339d565b92915050565b6000813590506122d8816133b4565b92915050565b6000815190506122ed816133b4565b92915050565b60006020828403121561230557600080fd5b600061231384828501612260565b91505092915050565b60006020828403121561232e57600080fd5b600061233c84828501612275565b91505092915050565b6000806040838503121561235857600080fd5b600061236685828601612260565b925050602061237785828601612260565b9150509250929050565b60008060006060848603121561239657600080fd5b60006123a486828701612260565b93505060206123b586828701612260565b92505060406123c6868287016122c9565b9150509250925092565b600080604083850312156123e357600080fd5b60006123f185828601612260565b9250506020612402858286016122c9565b9150509250929050565b60006020828403121561241e57600080fd5b600082013567ffffffffffffffff81111561243857600080fd5b6124448482850161228a565b91505092915050565b60006020828403121561245f57600080fd5b600061246d848285016122b4565b91505092915050565b60006020828403121561248857600080fd5b6000612496848285016122c9565b91505092915050565b6000602082840312156124b157600080fd5b60006124bf848285016122de565b91505092915050565b6124d181612c89565b82525050565b6124e081612c9b565b82525050565b60006124f182612b58565b6124fb8185612b63565b935061250b818560208601612cde565b61251481612e79565b840191505092915050565b600061252c602383612b63565b915061253782612e8a565b604082019050919050565b600061254f602283612b63565b915061255a82612ed9565b604082019050919050565b6000612572602483612b63565b915061257d82612f28565b604082019050919050565b6000612595602683612b63565b91506125a082612f77565b604082019050919050565b60006125b8602283612b63565b91506125c382612fc6565b604082019050919050565b60006125db602683612b63565b91506125e682613015565b604082019050919050565b60006125fe600b83612b63565b915061260982613064565b602082019050919050565b6000612621601983612b63565b915061262c8261308d565b602082019050919050565b6000612644601583612b63565b915061264f826130b6565b602082019050919050565b6000612667602883612b63565b9150612672826130df565b604082019050919050565b600061268a602083612b63565b91506126958261312e565b602082019050919050565b60006126ad602483612b63565b91506126b882613157565b604082019050919050565b60006126d0601783612b63565b91506126db826131a6565b602082019050919050565b60006126f3602183612b63565b91506126fe826131cf565b604082019050919050565b6000612716601c83612b63565b91506127218261321e565b602082019050919050565b6000612739602583612b63565b915061274482613247565b604082019050919050565b600061275c602483612b63565b915061276782613296565b604082019050919050565b600061277f601283612b63565b915061278a826132e5565b602082019050919050565b60006127a2602583612b63565b91506127ad8261330e565b604082019050919050565b60006127c5601f83612b63565b91506127d08261335d565b602082019050919050565b6127e481612cc7565b82525050565b6127f381612cd1565b82525050565b600060208201905061280e60008301846124c8565b92915050565b600060208201905061282960008301846124d7565b92915050565b6000602082019050818103600083015261284981846124e6565b905092915050565b6000602082019050818103600083015261286a8161251f565b9050919050565b6000602082019050818103600083015261288a81612542565b9050919050565b600060208201905081810360008301526128aa81612565565b9050919050565b600060208201905081810360008301526128ca81612588565b9050919050565b600060208201905081810360008301526128ea816125ab565b9050919050565b6000602082019050818103600083015261290a816125ce565b9050919050565b6000602082019050818103600083015261292a816125f1565b9050919050565b6000602082019050818103600083015261294a81612614565b9050919050565b6000602082019050818103600083015261296a81612637565b9050919050565b6000602082019050818103600083015261298a8161265a565b9050919050565b600060208201905081810360008301526129aa8161267d565b9050919050565b600060208201905081810360008301526129ca816126a0565b9050919050565b600060208201905081810360008301526129ea816126c3565b9050919050565b60006020820190508181036000830152612a0a816126e6565b9050919050565b60006020820190508181036000830152612a2a81612709565b9050919050565b60006020820190508181036000830152612a4a8161272c565b9050919050565b60006020820190508181036000830152612a6a8161274f565b9050919050565b60006020820190508181036000830152612a8a81612772565b9050919050565b60006020820190508181036000830152612aaa81612795565b9050919050565b60006020820190508181036000830152612aca816127b8565b9050919050565b6000602082019050612ae660008301846127db565b92915050565b6000602082019050612b0160008301846127ea565b92915050565b6000612b11612b22565b9050612b1d8282612d43565b919050565b6000604051905090565b600067ffffffffffffffff821115612b4757612b46612e4a565b5b602082029050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000612b7f82612cc7565b9150612b8a83612cc7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612bbf57612bbe612dbd565b5b828201905092915050565b6000612bd582612cc7565b9150612be083612cc7565b925082612bf057612bef612dec565b5b828204905092915050565b6000612c0682612cc7565b9150612c1183612cc7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c4a57612c49612dbd565b5b828202905092915050565b6000612c6082612cc7565b9150612c6b83612cc7565b925082821015612c7e57612c7d612dbd565b5b828203905092915050565b6000612c9482612ca7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015612cfc578082015181840152602081019050612ce1565b83811115612d0b576000848401525b50505050565b60006002820490506001821680612d2957607f821691505b60208210811415612d3d57612d3c612e1b565b5b50919050565b612d4c82612e79565b810181811067ffffffffffffffff82111715612d6b57612d6a612e4a565b5b80604052505050565b6000612d7f82612cc7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612db257612db1612dbd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f4e465420617420696e64657820686173206e6f74206265656e206d696e74656460008201527f2079657400000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f416c726561647920736574000000000000000000000000000000000000000000600082015250565b7f4f776e65722063616e6e6f742062652030206164647265737300000000000000600082015250565b7f4475706c696361746520746f6b656e20696e6465780000000000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b7f53656e646572206973206e6f7420746865206f776e6572000000000000000000600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f456d697373696f6e20686173206e6f7420737461727465642079657400000000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20616363756d756c61746564204d32360000000000000000000000000000600082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61338f81612c89565b811461339a57600080fd5b50565b6133a681612c9b565b81146133b157600080fd5b50565b6133bd81612cc7565b81146133c857600080fd5b5056fea26469706673582212209edb64569adaf1f61008f7db103713ab48204795c041ff2c67d6b440f2ed3e1764736f6c6343000803003300000000000000000000000000000000000000000000000000000000609161700000000000000000000000000000000000000000000000000000000069f8b4700000000000000000000000000000000000000000000000008ac7230489e80000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806379b8ac8a116100de578063a9059cbb11610097578063c607cde711610071578063c607cde71461049d578063dd62ed3e146104cd578063e90dfb5f146104fd578063f2fde38b1461051b5761018e565b8063a9059cbb14610433578063aba757f214610463578063b551b82f1461047f5761018e565b806379b8ac8a1461036f57806379cc67901461038d5780638da5cb5b146103a9578063928992ed146103c757806395d89b41146103e5578063a457c2d7146104035761018e565b8063395093511161014b5780636ba4c138116101255780636ba4c138146102e757806370a0823114610317578063715018a61461034757806373422b31146103515761018e565b8063395093511461026b5780633d3728b51461029b57806342966c68146102cb5761018e565b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101e157806323b872dd146101ff578063313ce5671461022f578063367df1651461024d575b600080fd5b61019b610537565b6040516101a8919061282f565b60405180910390f35b6101cb60048036038101906101c691906123d0565b6105c9565b6040516101d89190612814565b60405180910390f35b6101e96105e7565b6040516101f69190612ad1565b60405180910390f35b61021960048036038101906102149190612381565b6105f1565b6040516102269190612814565b60405180910390f35b6102376106f2565b6040516102449190612aec565b60405180910390f35b6102556106fb565b6040516102629190612ad1565b60405180910390f35b610285600480360381019061028091906123d0565b610708565b6040516102929190612814565b60405180910390f35b6102b560048036038101906102b09190612476565b6107b4565b6040516102c29190612ad1565b60405180910390f35b6102e560048036038101906102e09190612476565b6109f5565b005b61030160048036038101906102fc919061240c565b610a09565b60405161030e9190612ad1565b60405180910390f35b610331600480360381019061032c91906122f3565b610ea9565b60405161033e9190612ad1565b60405180910390f35b61034f610ef1565b005b61035961102e565b6040516103669190612ad1565b60405180910390f35b610377611033565b6040516103849190612ad1565b60405180910390f35b6103a760048036038101906103a291906123d0565b61103d565b005b6103b16110c1565b6040516103be91906127f9565b60405180910390f35b6103cf6110eb565b6040516103dc91906127f9565b60405180910390f35b6103ed611115565b6040516103fa919061282f565b60405180910390f35b61041d600480360381019061041891906123d0565b6111a7565b60405161042a9190612814565b60405180910390f35b61044d600480360381019061044891906123d0565b61129b565b60405161045a9190612814565b60405180910390f35b61047d600480360381019061047891906122f3565b6112b9565b005b61048761140a565b6040516104949190612ad1565b60405180910390f35b6104b760048036038101906104b29190612476565b611414565b6040516104c49190612ad1565b60405180910390f35b6104e760048036038101906104e29190612345565b6117e0565b6040516104f49190612ad1565b60405180910390f35b610505611867565b6040516105129190612ad1565b60405180910390f35b610535600480360381019061053091906122f3565b611871565b005b60606003805461054690612d11565b80601f016020809104026020016040519081016040528092919081815260200182805461057290612d11565b80156105bf5780601f10610594576101008083540402835291602001916105bf565b820191906000526020600020905b8154815290600101906020018083116105a257829003601f168201915b5050505050905090565b60006105dd6105d6611a1d565b8484611a25565b6001905092915050565b6000600254905090565b60006105fe848484611bf0565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610649611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156106c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c090612971565b60405180910390fd5b6106e6856106d5611a1d565b85846106e19190612c55565b611a25565b60019150509392505050565b60006012905090565b686dd465e9cabd68000081565b60006107aa610715611a1d565b848460016000610723611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546107a59190612b74565b611a25565b6001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016108289190612ad1565b60206040518083038186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610878919061231c565b73ffffffffffffffffffffffffffffffffffffffff1614156108cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c690612931565b60405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561093757600080fd5b505afa15801561094b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096f919061249f565b82106109b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a790612891565b60405180910390fd5b600080600960008581526020019081526020016000205414156109d5576006546109ea565b60096000848152602001908152602001600020545b905080915050919050565b610a06610a00611a1d565b82611e6f565b50565b60006006544211610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4690612a11565b60405180910390fd5b6000805b8351811015610e2457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ac457600080fd5b505afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afc919061249f565b848281518110610b35577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015110610b7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7490612891565b60405180910390fd5b6000600182610b8c9190612b74565b90505b8451811015610c6e57848181518110610bd1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151858381518110610c12577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101511415610c5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5290612951565b60405180910390fd5b8080610c6690612d74565b915050610b8f565b506000848281518110610caa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190503373ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610d269190612ad1565b60206040518083038186803b158015610d3e57600080fd5b505afa158015610d52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d76919061231c565b73ffffffffffffffffffffffffffffffffffffffff1614610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc3906129d1565b60405180910390fd5b6000610dd782611414565b905060008114610e0f57610df4818561204390919063ffffffff16565b93504260096000848152602001908152602001600020819055505b50508080610e1c90612d74565b915050610a53565b506000811415610e69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6090612a71565b60405180910390fd5b610e733382612059565b610e9f600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682610708565b5080915050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ef9611a1d565b73ffffffffffffffffffffffffffffffffffffffff16610f176110c1565b73ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6490612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600281565b6000600754905090565b60006110508361104b611a1d565b6117e0565b905081811015611095576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108c906129b1565b60405180910390fd5b6110b2836110a1611a1d565b84846110ad9190612c55565b611a25565b6110bc8383611e6f565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461112490612d11565b80601f016020809104026020016040519081016040528092919081815260200182805461115090612d11565b801561119d5780601f106111725761010080835404028352916020019161119d565b820191906000526020600020905b81548152906001019060200180831161118057829003601f168201915b5050505050905090565b600080600160006111b6611a1d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126a90612a91565b60405180910390fd5b61129061127e611a1d565b85858461128b9190612c55565b611a25565b600191505092915050565b60006112af6112a8611a1d565b8484611bf0565b6001905092915050565b6112c1611a1d565b73ffffffffffffffffffffffffffffffffffffffff166112df6110c1565b73ffffffffffffffffffffffffffffffffffffffff1614611335576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132c90612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bd90612911565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600854905090565b6000600654421161145a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145190612a11565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016114cd9190612ad1565b60206040518083038186803b1580156114e557600080fd5b505afa1580156114f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151d919061231c565b73ffffffffffffffffffffffffffffffffffffffff161415611574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156b90612931565b60405180910390fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156115dc57600080fd5b505afa1580156115f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611614919061249f565b8210611655576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164c90612891565b60405180910390fd5b6000611660836107b4565b905060075481106116755760009150506117db565b600060075442106116885760075461168a565b425b905060006116ca620151806116bc6008546116ae87876121ad90919063ffffffff16565b6121c390919063ffffffff16565b6121d990919063ffffffff16565b90506006548314156117d457600060011515600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bc28d702886040518263ffffffff1660e01b81526004016117379190612ad1565b60206040518083038186803b15801561174f57600080fd5b505afa158015611763573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611787919061244d565b15151461179d57686dd465e9cabd6800006117bb565b6117ba6002686dd465e9cabd6800006121c390919063ffffffff16565b5b90506117d0818361204390919063ffffffff16565b9150505b8093505050505b919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600654905090565b611879611a1d565b73ffffffffffffffffffffffffffffffffffffffff166118976110c1565b73ffffffffffffffffffffffffffffffffffffffff16146118ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e490612991565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611954906128b1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c90612a51565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afc906128d1565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611be39190612ad1565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5790612a31565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611cd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc790612851565b60405180910390fd5b611cdb8383836121ef565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d58906128f1565b60405180910390fd5b8181611d6d9190612c55565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611dfd9190612b74565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611e619190612ad1565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed6906129f1565b60405180910390fd5b611eeb826000836121ef565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6890612871565b60405180910390fd5b8181611f7d9190612c55565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254611fd19190612c55565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516120369190612ad1565b60405180910390a3505050565b600081836120519190612b74565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120c090612ab1565b60405180910390fd5b6120d5600083836121ef565b80600260008282546120e79190612b74565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461213c9190612b74565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121a19190612ad1565b60405180910390a35050565b600081836121bb9190612c55565b905092915050565b600081836121d19190612bfb565b905092915050565b600081836121e79190612bca565b905092915050565b505050565b600061220761220284612b2c565b612b07565b9050808382526020820190508285602086028201111561222657600080fd5b60005b85811015612256578161223c88826122c9565b845260208401935060208301925050600181019050612229565b5050509392505050565b60008135905061226f81613386565b92915050565b60008151905061228481613386565b92915050565b600082601f83011261229b57600080fd5b81356122ab8482602086016121f4565b91505092915050565b6000815190506122c38161339d565b92915050565b6000813590506122d8816133b4565b92915050565b6000815190506122ed816133b4565b92915050565b60006020828403121561230557600080fd5b600061231384828501612260565b91505092915050565b60006020828403121561232e57600080fd5b600061233c84828501612275565b91505092915050565b6000806040838503121561235857600080fd5b600061236685828601612260565b925050602061237785828601612260565b9150509250929050565b60008060006060848603121561239657600080fd5b60006123a486828701612260565b93505060206123b586828701612260565b92505060406123c6868287016122c9565b9150509250925092565b600080604083850312156123e357600080fd5b60006123f185828601612260565b9250506020612402858286016122c9565b9150509250929050565b60006020828403121561241e57600080fd5b600082013567ffffffffffffffff81111561243857600080fd5b6124448482850161228a565b91505092915050565b60006020828403121561245f57600080fd5b600061246d848285016122b4565b91505092915050565b60006020828403121561248857600080fd5b6000612496848285016122c9565b91505092915050565b6000602082840312156124b157600080fd5b60006124bf848285016122de565b91505092915050565b6124d181612c89565b82525050565b6124e081612c9b565b82525050565b60006124f182612b58565b6124fb8185612b63565b935061250b818560208601612cde565b61251481612e79565b840191505092915050565b600061252c602383612b63565b915061253782612e8a565b604082019050919050565b600061254f602283612b63565b915061255a82612ed9565b604082019050919050565b6000612572602483612b63565b915061257d82612f28565b604082019050919050565b6000612595602683612b63565b91506125a082612f77565b604082019050919050565b60006125b8602283612b63565b91506125c382612fc6565b604082019050919050565b60006125db602683612b63565b91506125e682613015565b604082019050919050565b60006125fe600b83612b63565b915061260982613064565b602082019050919050565b6000612621601983612b63565b915061262c8261308d565b602082019050919050565b6000612644601583612b63565b915061264f826130b6565b602082019050919050565b6000612667602883612b63565b9150612672826130df565b604082019050919050565b600061268a602083612b63565b91506126958261312e565b602082019050919050565b60006126ad602483612b63565b91506126b882613157565b604082019050919050565b60006126d0601783612b63565b91506126db826131a6565b602082019050919050565b60006126f3602183612b63565b91506126fe826131cf565b604082019050919050565b6000612716601c83612b63565b91506127218261321e565b602082019050919050565b6000612739602583612b63565b915061274482613247565b604082019050919050565b600061275c602483612b63565b915061276782613296565b604082019050919050565b600061277f601283612b63565b915061278a826132e5565b602082019050919050565b60006127a2602583612b63565b91506127ad8261330e565b604082019050919050565b60006127c5601f83612b63565b91506127d08261335d565b602082019050919050565b6127e481612cc7565b82525050565b6127f381612cd1565b82525050565b600060208201905061280e60008301846124c8565b92915050565b600060208201905061282960008301846124d7565b92915050565b6000602082019050818103600083015261284981846124e6565b905092915050565b6000602082019050818103600083015261286a8161251f565b9050919050565b6000602082019050818103600083015261288a81612542565b9050919050565b600060208201905081810360008301526128aa81612565565b9050919050565b600060208201905081810360008301526128ca81612588565b9050919050565b600060208201905081810360008301526128ea816125ab565b9050919050565b6000602082019050818103600083015261290a816125ce565b9050919050565b6000602082019050818103600083015261292a816125f1565b9050919050565b6000602082019050818103600083015261294a81612614565b9050919050565b6000602082019050818103600083015261296a81612637565b9050919050565b6000602082019050818103600083015261298a8161265a565b9050919050565b600060208201905081810360008301526129aa8161267d565b9050919050565b600060208201905081810360008301526129ca816126a0565b9050919050565b600060208201905081810360008301526129ea816126c3565b9050919050565b60006020820190508181036000830152612a0a816126e6565b9050919050565b60006020820190508181036000830152612a2a81612709565b9050919050565b60006020820190508181036000830152612a4a8161272c565b9050919050565b60006020820190508181036000830152612a6a8161274f565b9050919050565b60006020820190508181036000830152612a8a81612772565b9050919050565b60006020820190508181036000830152612aaa81612795565b9050919050565b60006020820190508181036000830152612aca816127b8565b9050919050565b6000602082019050612ae660008301846127db565b92915050565b6000602082019050612b0160008301846127ea565b92915050565b6000612b11612b22565b9050612b1d8282612d43565b919050565b6000604051905090565b600067ffffffffffffffff821115612b4757612b46612e4a565b5b602082029050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000612b7f82612cc7565b9150612b8a83612cc7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612bbf57612bbe612dbd565b5b828201905092915050565b6000612bd582612cc7565b9150612be083612cc7565b925082612bf057612bef612dec565b5b828204905092915050565b6000612c0682612cc7565b9150612c1183612cc7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c4a57612c49612dbd565b5b828202905092915050565b6000612c6082612cc7565b9150612c6b83612cc7565b925082821015612c7e57612c7d612dbd565b5b828203905092915050565b6000612c9482612ca7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015612cfc578082015181840152602081019050612ce1565b83811115612d0b576000848401525b50505050565b60006002820490506001821680612d2957607f821691505b60208210811415612d3d57612d3c612e1b565b5b50919050565b612d4c82612e79565b810181811067ffffffffffffffff82111715612d6b57612d6a612e4a565b5b80604052505050565b6000612d7f82612cc7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612db257612db1612dbd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f4e465420617420696e64657820686173206e6f74206265656e206d696e74656460008201527f2079657400000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f416c726561647920736574000000000000000000000000000000000000000000600082015250565b7f4f776e65722063616e6e6f742062652030206164647265737300000000000000600082015250565b7f4475706c696361746520746f6b656e20696e6465780000000000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b7f53656e646572206973206e6f7420746865206f776e6572000000000000000000600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f456d697373696f6e20686173206e6f7420737461727465642079657400000000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20616363756d756c61746564204d32360000000000000000000000000000600082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61338f81612c89565b811461339a57600080fd5b50565b6133a681612c9b565b81146133b157600080fd5b50565b6133bd81612cc7565b81146133c857600080fd5b5056fea26469706673582212209edb64569adaf1f61008f7db103713ab48204795c041ff2c67d6b440f2ed3e1764736f6c63430008030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000609161700000000000000000000000000000000000000000000000000000000069f8b4700000000000000000000000000000000000000000000000008ac7230489e80000
-----Decoded View---------------
Arg [0] : emissionStartTimestamp_ (uint256): 1620140400
Arg [1] : emissionEndTimestamp_ (uint256): 1777906800
Arg [2] : emissionPerDay_ (uint256): 10000000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000060916170
Arg [1] : 0000000000000000000000000000000000000000000000000000000069f8b470
Arg [2] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.