ERC-721
Overview
Max Total Supply
0 Degg
Holders
468
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 DeggLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DinoEgg
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "./Dino.sol"; contract DinoEgg is ERC721, ERC721Burnable, Ownable, ERC2981 { using Counters for Counters.Counter; using Strings for uint256; Hatch public hatchPhase; States public currentState; IERC20 public dinoToken; DinoNFT public dinoHatchery; //6 counters, 1 for egg, 5 for dino Counters.Counter public _tokenIDcounter; Counters.Counter[5] private _base; //lets enumerate tokenIDs by owner - [owner][index => tokenID] mapping(address => mapping(uint256 => uint256)) public _ownedTokens; //WL mapping(address => bool) public isVIP; mapping(address => bool) public isBigStaker; mapping(address => bool) public isSmallStaker; mapping(address => uint) public vipMintCount; mapping(address => uint) public stakersMintCount; mapping(address => uint) public publicMintCount; mapping(uint => bool) public burnedIDs; uint public vipMintLimit = 10; uint public stakerLimits = 3; uint public pubMintLimit = 2; uint public pubMintThrottle = 2; uint public totalMinted; uint maxSupply = 10000; string public baseURI; uint256 cost = .0333 ether; uint private nonce; address dinoWallet; enum States { bigStakeMint, littleStakeMint, publicMint } enum Hatch { cannotHatch, canHatch } constructor( address dino, address _dinoToken, address _royaltyWallet, address _dinoWallet ) ERC721("Dino Mystery Egg", "Degg") { _setDefaultRoyalty(_royaltyWallet, 1000); dinoWallet = _dinoWallet; dinoToken = IERC20(_dinoToken); dinoHatchery = DinoNFT(dino); currentState = States.bigStakeMint; hatchPhase = Hatch.cannotHatch; } /*phase management */ function canHatch() public onlyOwner { if(hatchPhase == Hatch.cannotHatch){ hatchPhase = Hatch.canHatch; } } function cannotHatch() public onlyOwner { if(hatchPhase == Hatch.canHatch){ hatchPhase = Hatch.cannotHatch; } } function forwardState() public onlyOwner { if(currentState == States.bigStakeMint) { currentState = States.littleStakeMint; } else if(currentState == States.littleStakeMint) { currentState = States.publicMint; } } function backState() public onlyOwner { if(currentState == States.publicMint){ currentState = States.littleStakeMint; } else if(currentState == States.littleStakeMint){ currentState = States.bigStakeMint; } } /* end */ /*WL section */ function addVIPs(address[] calldata _vip) public onlyOwner { for(uint i = 0; i < _vip.length; i++){ isVIP[_vip[i]] = true; } } function addBigStakers(address[] calldata _bigStaker) public onlyOwner { for(uint i = 0; i < _bigStaker.length; i++){ isBigStaker[_bigStaker[i]] = true; } } function addSmallStakers(address[] calldata _smallStakers) public onlyOwner { for(uint i = 0; i < _smallStakers.length; i++){ isSmallStaker[_smallStakers[i]] = true; } } /* end */ //requires token approval function vipAndTeamMint(uint quantity) public { require(isVIP[msg.sender] == true,"you're up to no good if you're seeing this."); require(vipMintCount[msg.sender] + quantity <= vipMintLimit, "that's all you get from this mint function"); require(dinoToken.transferFrom(msg.sender, address(this), (1000 * 10 ** 18) * quantity),"either no approval or not enough dino"); for(uint i = 0; i < quantity; i++){ //increase tokenID counter to start at one _tokenIDcounter.increment(); //current tokenID uint tokenID = _tokenIDcounter.current(); //vip mint count vipMintCount[msg.sender] ++; //mint the egg to msg sender _safeMint(msg.sender, tokenID); //increase total minted counter totalMinted++; //emit egg mint event emit eggMinted(msg.sender, tokenID); _ownedTokens[msg.sender][i] = tokenID; } } //must have token approval prior to calling function stakersMint(uint quantity) public { require(currentState != States.publicMint,"private sales closed"); require(stakersMintCount[msg.sender] + quantity <= stakerLimits, "you've minted the max amount for this phase"); require(dinoToken.transferFrom(msg.sender, address(this), (1000 * 10 ** 18) * quantity),"either no approval or not enough dino"); if(currentState == States.bigStakeMint){ require(isBigStaker[msg.sender] == true, "youre not a big staker. check back later"); } else if(currentState == States.littleStakeMint) { require(dinoToken.balanceOf(msg.sender) >= 10000 * 10 **18 || isSmallStaker[msg.sender] == true, "not staking or have enough dino"); } //loop through quantity amount and begin egg minting process for(uint i = 0; i < quantity; i++){ stakersMintCount[msg.sender] ++; //increase tokenID counter _tokenIDcounter.increment(); //current tokenID uint tokenID = _tokenIDcounter.current(); //mint the egg to msg sender _safeMint(msg.sender, tokenID); //increase total minted counter totalMinted++; //emit egg mint event _ownedTokens[msg.sender][i] = tokenID; emit eggMinted(msg.sender, tokenID); } } //requires token approval function publicMint(uint quantity) public { require(currentState != States.bigStakeMint && currentState != States.littleStakeMint, "public sale has not opened yet."); //cap max supply at 10_000 require(_tokenIDcounter.current() <= maxSupply, "max supply met."); //move dino tokens from caller to contract for batch burning require(dinoToken.transferFrom(msg.sender, address(this), (1000 * 10 ** 18) * quantity),"either no approval or not enough dino"); //max 2 per wallet on public sale require(publicMintCount[msg.sender] + quantity <= pubMintLimit,"you've minted max for public"); for(uint i = 0; i < quantity; i++){ publicMintCount[msg.sender] ++; //increase tokenID counter _tokenIDcounter.increment(); //current tokenID uint tokenID = _tokenIDcounter.current(); //mint the egg to msg sender _safeMint(msg.sender, tokenID); //increase total minted counter totalMinted++; //emit egg mint event _ownedTokens[msg.sender][i] = tokenID; emit eggMinted(msg.sender, tokenID); } } //charges ether function hatchEgg(uint _eggID) public payable { //gotta own the egg if you wanna hatch it require(ownerOf(_eggID) == msg.sender, "what are u doing?"); require(hatchPhase == Hatch.canHatch,"its not time to hatch your egg yet"); require(msg.value >= cost,"not enough ether sent"); _burn(_eggID); burnedIDs[_eggID] = true; emit eggBurn(msg.sender, _eggID); randomHatch(msg.sender); emit numberRequested(_eggID, msg.sender); } function setBaseURI(string memory _newURI) public onlyOwner { baseURI = _newURI; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI)) : ""; } //transfers dino from contract to dead wallet. no other options. function burnDinoTokens() public onlyOwner { uint256 burnBalance = dinoToken.balanceOf(address(this)); dinoToken.transfer(address(0x000000000000000000000000000000000000dEaD), burnBalance); } //withdraws ether to contract owner function withdrawEther() public onlyOwner { uint256 contractEthBal = address(this).balance; payable(dinoWallet).transfer(contractEthBal); } function setCost(uint _newCost) public onlyOwner { cost = _newCost; } function setPubLimit(uint _amount) public onlyOwner { pubMintLimit = _amount; } function setPubThrottle(uint _amount) public onlyOwner { pubMintThrottle = _amount; } function setStakerLimits(uint _amount) public onlyOwner { stakerLimits = _amount; } function randomHatch(address _hatchee) internal { uint word = uint256(keccak256(abi.encodePacked(block.timestamp, blockhash(block.number - 1), block.coinbase, msg.sender, nonce++))); uint range = (word % 5) + 1; emit numberResolved(range, msg.sender); while(true) { if(_base[range - 1].current() < 2000) { uint startingIndex = (range - 1) * 2000 + 1; // 1, 2001, 4001 etc. uint tokenid = _base[range - 1].current() + startingIndex; _base[range - 1].increment(); dinoHatchery.indexHatcher(_hatchee, tokenid); emit hatchSent(_hatchee, tokenid); break; } else { word = uint256(keccak256(abi.encodePacked(word))); range = (word % 5) + 1; } } } //override to make royalties and 721 get along function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /* events */ event eggMinted ( address receiver, uint eggID ); event eggBurn ( address burner, uint eggID ); event hatchSent ( address receiver, uint dinoID ); event numberRequested( uint indexed eggID, address indexed caller ); event numberResolved( uint indexed number, address indexed caller ); //neo was here }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); 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) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @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 from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-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. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } function setValue(Counter storage counter, uint256 _new) internal { counter._value = _new; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract DinoNFT is ERC721, Ownable, ERC2981 { using Strings for uint256; address public qualifiedMinter; address private hatcher; uint private idToHatch; string public baseURI; string public baseExtension = ".json"; uint totalMinted; mapping(uint => address) public idToHatchee; mapping(address => uint) lastOriginAccess; constructor( address _royaltyWallet ) ERC721("The DINOsaurs","Dinos") { _setDefaultRoyalty(_royaltyWallet, 500); } function setQualifiedMinter(address minter) public onlyOwner { qualifiedMinter = minter; } modifier updatesOrigin() { lastOriginAccess[tx.origin] = block.number; _; } modifier noOriginAccess() { require(lastOriginAccess[tx.origin] != block.number); _; } function ownerOf(uint256 tokenId) noOriginAccess public view override returns (address) { super.ownerOf(tokenId); } //override to make royalties and 721 get along function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function indexHatcher(address _hatcher, uint _idToHatch) public updatesOrigin { require(msg.sender == qualifiedMinter, "not qualified."); hatcher = _hatcher; idToHatch = _idToHatch; idToHatchee[idToHatch] = hatcher; hatchEgg(hatcher, idToHatch); } function hatchEgg(address _receiver, uint _id) internal { _safeMint(_receiver, _id); totalMinted++; emit TokenIssued(_id, _receiver); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension)) : ""; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function setBaseURI(string memory _newbaseURI) public onlyOwner { baseURI = _newbaseURI; } function metaMint() public onlyOwner { _safeMint(msg.sender, 10001); } event TokenIssued( uint256 tokenID, address hatcher ); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"dino","type":"address"},{"internalType":"address","name":"_dinoToken","type":"address"},{"internalType":"address","name":"_royaltyWallet","type":"address"},{"internalType":"address","name":"_dinoWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"burner","type":"address"},{"indexed":false,"internalType":"uint256","name":"eggID","type":"uint256"}],"name":"eggBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"eggID","type":"uint256"}],"name":"eggMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"dinoID","type":"uint256"}],"name":"hatchSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"eggID","type":"uint256"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"numberRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"numberResolved","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_ownedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenIDcounter","outputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_bigStaker","type":"address[]"}],"name":"addBigStakers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_smallStakers","type":"address[]"}],"name":"addSmallStakers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_vip","type":"address[]"}],"name":"addVIPs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"backState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnDinoTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burnedIDs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canHatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cannotHatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentState","outputs":[{"internalType":"enum DinoEgg.States","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dinoHatchery","outputs":[{"internalType":"contract DinoNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dinoToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forwardState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eggID","type":"uint256"}],"name":"hatchEgg","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"hatchPhase","outputs":[{"internalType":"enum DinoEgg.Hatch","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBigStaker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isSmallStaker","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isVIP","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pubMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pubMintThrottle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setPubLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setPubThrottle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setStakerLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakerLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"stakersMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakersMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"vipAndTeamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vipMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vipMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a6019556003601a556002601b556002601c55612710601e5566764e2c6f0540006020553480156200003657600080fd5b506040516200382f3803806200382f8339810160408190526200005991620002bc565b6040518060400160405280601081526020016f44696e6f204d7973746572792045676760801b815250604051806040016040528060048152602001634465676760e01b8152508160009081620000b09190620003be565b506001620000bf8282620003be565b505050620000dc620000d66200014460201b60201c565b62000148565b620000ea826103e86200019a565b602280546001600160a01b039283166001600160a01b03199182161790915560098054600a805497851697909316969096179091559216620100000261ffff19166001600160b01b0319909316929092179055506200048a565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b03821611156200020e5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002665760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c696420726563656976657200000000000000604482015260640162000205565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600755565b80516001600160a01b0381168114620002b757600080fd5b919050565b60008060008060808587031215620002d357600080fd5b620002de856200029f565b9350620002ee602086016200029f565b9250620002fe604086016200029f565b91506200030e606086016200029f565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200034457607f821691505b6020821081036200036557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003b957600081815260208120601f850160051c81016020861015620003945750805b601f850160051c820191505b81811015620003b557828155600101620003a0565b5050505b505050565b81516001600160401b03811115620003da57620003da62000319565b620003f281620003eb84546200032f565b846200036b565b602080601f8311600181146200042a5760008415620004115750858301515b600019600386901b1c1916600185901b178555620003b5565b600085815260208120601f198616915b828110156200045b578886015182559484019460019091019084016200043a565b50858210156200047a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613395806200049a6000396000f3fe6080604052600436106103505760003560e01c80636c0360eb116101c6578063a65b5da3116100f7578063dad3ccad11610095578063f2fde38b1161006f578063f2fde38b146109e8578063f4201c3c14610a08578063f69adce614610a38578063f87fdf2714610a5e57600080fd5b8063dad3ccad1461099d578063e1575364146109b3578063e985e9c5146109c857600080fd5b8063beff1a3a116100d1578063beff1a3a14610906578063c3d1b9d214610926578063c87b56dd14610956578063d412b0b11461097657600080fd5b8063a65b5da3146108a1578063b88d4fde146108d1578063bb18d542146108f157600080fd5b806389240de21161016457806396330b5f1161013e57806396330b5f14610811578063a22cb4651461083e578063a2309ff81461085e578063a27448831461087457600080fd5b806389240de2146107be5780638da5cb5b146107de57806395d89b41146107fc57600080fd5b80637362377b116101a05780637362377b146107525780637f4093ec1461076757806381ca8d4c1461077e5780638811dc131461079e57600080fd5b80636c0360eb1461070857806370a082311461071d578063715018a61461073d57600080fd5b80632a55205a116102a05780634615de281161023e57806359dccb621161021857806359dccb62146106935780636322e237146106a85780636352211e146106c857806369088f71146106e857600080fd5b80634615de28146106265780634f3c5f061461063b57806355f804b31461067357600080fd5b80633a0227781161027a5780633a022778146105b057806342842e0e146105c657806342966c68146105e657806344a0d68a1461060657600080fd5b80632a55205a1461053b5780632c86e5ba1461057a5780632db115441461059057600080fd5b80630c3f6acf1161030d5780632385554c116102e75780632385554c146104c857806323b872dd146104db57806323ecdd3a146104fb578063271c85c21461051b57600080fd5b80630c3f6acf1461043f57806311dceda71461046b578063124fb53c1461049857600080fd5b806301ffc9a71461035557806305e4f70b1461038a57806306fdde03146103ae578063081812fc146103d057806308956f2b14610408578063095ea7b31461041f575b600080fd5b34801561036157600080fd5b50610375610370366004612ba8565b610a7e565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b506103a0601c5481565b604051908152602001610381565b3480156103ba57600080fd5b506103c3610aa9565b6040516103819190612c15565b3480156103dc57600080fd5b506103f06103eb366004612c28565b610b3b565b6040516001600160a01b039091168152602001610381565b34801561041457600080fd5b5061041d610b62565b005b34801561042b57600080fd5b5061041d61043a366004612c5d565b610bdb565b34801561044b57600080fd5b5060095461045e90610100900460ff1681565b6040516103819190612c9d565b34801561047757600080fd5b506103a0610486366004612cb7565b60156020526000908152604090205481565b3480156104a457600080fd5b506103756104b3366004612cb7565b60146020526000908152604090205460ff1681565b61041d6104d6366004612c28565b610cf5565b3480156104e757600080fd5b5061041d6104f6366004612cd2565b610e99565b34801561050757600080fd5b5061041d610516366004612c28565b610ecb565b34801561052757600080fd5b5061041d610536366004612c28565b610ed8565b34801561054757600080fd5b5061055b610556366004612d0e565b61115f565b604080516001600160a01b039093168352602083019190915201610381565b34801561058657600080fd5b506103a060195481565b34801561059c57600080fd5b5061041d6105ab366004612c28565b61120b565b3480156105bc57600080fd5b506103a0601a5481565b3480156105d257600080fd5b5061041d6105e1366004612cd2565b6114dc565b3480156105f257600080fd5b5061041d610601366004612c28565b6114f7565b34801561061257600080fd5b5061041d610621366004612c28565b611528565b34801561063257600080fd5b5061041d611535565b34801561064757600080fd5b506103a0610656366004612c5d565b601160209081526000928352604080842090915290825290205481565b34801561067f57600080fd5b5061041d61068e366004612dbc565b6115af565b34801561069f57600080fd5b5061041d6115c3565b3480156106b457600080fd5b5061041d6106c3366004612e05565b6116bc565b3480156106d457600080fd5b506103f06106e3366004612c28565b611736565b3480156106f457600080fd5b5061041d610703366004612e05565b611796565b34801561071457600080fd5b506103c3611810565b34801561072957600080fd5b506103a0610738366004612cb7565b61189e565b34801561074957600080fd5b5061041d611924565b34801561075e57600080fd5b5061041d611936565b34801561077357600080fd5b50600b546103a09081565b34801561078a57600080fd5b5061041d610799366004612c28565b611978565b3480156107aa57600080fd5b5061041d6107b9366004612c28565b611985565b3480156107ca57600080fd5b50600a546103f0906001600160a01b031681565b3480156107ea57600080fd5b506006546001600160a01b03166103f0565b34801561080857600080fd5b506103c3611992565b34801561081d57600080fd5b506103a061082c366004612cb7565b60176020526000908152604090205481565b34801561084a57600080fd5b5061041d610859366004612e88565b6119a1565b34801561086a57600080fd5b506103a0601d5481565b34801561088057600080fd5b506103a061088f366004612cb7565b60166020526000908152604090205481565b3480156108ad57600080fd5b506103756108bc366004612cb7565b60136020526000908152604090205460ff1681565b3480156108dd57600080fd5b5061041d6108ec366004612ebf565b6119ac565b3480156108fd57600080fd5b5061041d6119e4565b34801561091257600080fd5b5061041d610921366004612e05565b611a1e565b34801561093257600080fd5b50610375610941366004612c28565b60186020526000908152604090205460ff1681565b34801561096257600080fd5b506103c3610971366004612c28565b611a98565b34801561098257600080fd5b506009546109909060ff1681565b6040516103819190612f3b565b3480156109a957600080fd5b506103a0601b5481565b3480156109bf57600080fd5b5061041d611b69565b3480156109d457600080fd5b506103756109e3366004612f4f565b611ba2565b3480156109f457600080fd5b5061041d610a03366004612cb7565b611bd0565b348015610a1457600080fd5b50610375610a23366004612cb7565b60126020526000908152604090205460ff1681565b348015610a4457600080fd5b506009546103f0906201000090046001600160a01b031681565b348015610a6a57600080fd5b5061041d610a79366004612c28565b611c46565b60006001600160e01b0319821663152a902d60e11b1480610aa35750610aa38261205c565b92915050565b606060008054610ab890612f82565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae490612f82565b8015610b315780601f10610b0657610100808354040283529160200191610b31565b820191906000526020600020905b815481529060010190602001808311610b1457829003601f168201915b5050505050905090565b6000610b4682612081565b506000908152600460205260409020546001600160a01b031690565b610b6a6120e0565b6000600954610100900460ff166002811115610b8857610b88612c87565b03610ba657600980546001919061ff001916610100835b0217905550565b6001600954610100900460ff166002811115610bc457610bc4612c87565b03610bd9576009805461ff0019166102001790555b565b6000610be682611736565b9050806001600160a01b0316836001600160a01b031603610c585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c745750610c748133611ba2565b610ce65760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c4f565b610cf0838361213a565b505050565b33610cff82611736565b6001600160a01b031614610d495760405162461bcd60e51b81526020600482015260116024820152707768617420617265207520646f696e673f60781b6044820152606401610c4f565b600160095460ff166001811115610d6257610d62612c87565b14610dba5760405162461bcd60e51b815260206004820152602260248201527f697473206e6f742074696d6520746f20686174636820796f7572206567672079604482015261195d60f21b6064820152608401610c4f565b602054341015610e045760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610c4f565b610e0d816121a8565b600081815260186020908152604091829020805460ff1916600117905581513381529081018390527f723e2d6e31cba83ca74a92e737009ce38f33d6fd3799dc57e33311125c142ec9910160405180910390a1610e693361224b565b604051339082907f35c632a45238198d080cde061350900f6d1b862bce1a07f7e8012cfe51394acf90600090a350565b610ea4335b826124a1565b610ec05760405162461bcd60e51b8152600401610c4f90612fbc565b610cf0838383612500565b610ed36120e0565b601c55565b3360009081526012602052604090205460ff161515600114610f505760405162461bcd60e51b815260206004820152602b60248201527f796f7527726520757020746f206e6f20676f6f6420696620796f75277265207360448201526a32b2b4b733903a3434b99760a91b6064820152608401610c4f565b60195433600090815260156020526040902054610f6e90839061301f565b1115610fcf5760405162461bcd60e51b815260206004820152602a60248201527f74686174277320616c6c20796f75206765742066726f6d2074686973206d696e6044820152693a10333ab731ba34b7b760b11b6064820152608401610c4f565b6009546201000090046001600160a01b03166323b872dd3330610ffb85683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561104f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110739190613049565b61108f5760405162461bcd60e51b8152600401610c4f90613066565b60005b8181101561115b576110a8600b80546001019055565b60006110b3600b5490565b3360009081526015602052604081208054929350906110d1836130ab565b91905055506110e03382612671565b601d80549060006110f0836130ab565b909155505060408051338152602081018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a133600090815260116020908152604080832085845290915290205580611153816130ab565b915050611092565b5050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916111d45750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906111f3906001600160601b031687613032565b6111fd91906130da565b915196919550909350505050565b6000600954610100900460ff16600281111561122957611229612c87565b1415801561125357506001600954610100900460ff16600281111561125057611250612c87565b14155b61129f5760405162461bcd60e51b815260206004820152601f60248201527f7075626c69632073616c6520686173206e6f74206f70656e6564207965742e006044820152606401610c4f565b601e54600b5411156112e55760405162461bcd60e51b815260206004820152600f60248201526e36b0bc1039bab838363c9036b2ba1760891b6044820152606401610c4f565b6009546201000090046001600160a01b03166323b872dd333061131185683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113899190613049565b6113a55760405162461bcd60e51b8152600401610c4f90613066565b601b54336000908152601760205260409020546113c390839061301f565b11156114115760405162461bcd60e51b815260206004820152601c60248201527f796f75277665206d696e746564206d617820666f72207075626c6963000000006044820152606401610c4f565b60005b8181101561115b57336000908152601760205260408120805491611437836130ab565b919050555061144a600b80546001019055565b6000611455600b5490565b90506114613382612671565b601d8054906000611471836130ab565b9091555050336000818152601160209081526040808320868452825291829020849055815192835282018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a150806114d4816130ab565b915050611414565b610cf0838383604051806020016040528060008152506119ac565b61150033610e9e565b61151c5760405162461bcd60e51b8152600401610c4f90612fbc565b611525816121a8565b50565b6115306120e0565b602055565b61153d6120e0565b6002600954610100900460ff16600281111561155b5761155b612c87565b0361157657600980546001919061ff00191661010083610b9f565b6001600954610100900460ff16600281111561159457611594612c87565b03610bd957600980546000919061ff00191661010083610b9f565b6115b76120e0565b601f61115b828261313c565b6115cb6120e0565b6009546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a0823190602401602060405180830381865afa15801561161a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163e91906131fc565b60095460405163a9059cbb60e01b815261dead6004820152602481018390529192506201000090046001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015611698573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115b9190613049565b6116c46120e0565b60005b81811015610cf0576001601460008585858181106116e7576116e7613215565b90506020020160208101906116fc9190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061172e816130ab565b9150506116c7565b6000818152600260205260408120546001600160a01b031680610aa35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c4f565b61179e6120e0565b60005b81811015610cf0576001601260008585858181106117c1576117c1613215565b90506020020160208101906117d69190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611808816130ab565b9150506117a1565b601f805461181d90612f82565b80601f016020809104026020016040519081016040528092919081815260200182805461184990612f82565b80156118965780601f1061186b57610100808354040283529160200191611896565b820191906000526020600020905b81548152906001019060200180831161187957829003601f168201915b505050505081565b60006001600160a01b0382166119085760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c4f565b506001600160a01b031660009081526003602052604090205490565b61192c6120e0565b610bd9600061268b565b61193e6120e0565b60225460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561115b573d6000803e3d6000fd5b6119806120e0565b601a55565b61198d6120e0565b601b55565b606060018054610ab890612f82565b61115b3383836126dd565b6119b633836124a1565b6119d25760405162461bcd60e51b8152600401610c4f90612fbc565b6119de848484846127ab565b50505050565b6119ec6120e0565b600160095460ff166001811115611a0557611a05612c87565b03610bd957600980546000919060ff1916600183610b9f565b611a266120e0565b60005b81811015610cf057600160136000858585818110611a4957611a49613215565b9050602002016020810190611a5e9190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611a90816130ab565b915050611a29565b6000818152600260205260409020546060906001600160a01b0316611b175760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c4f565b6000611b216127de565b90506000815111611b415760405180602001604052806000815250611b62565b80604051602001611b52919061322b565b6040516020818303038152906040525b9392505050565b611b716120e0565b600060095460ff166001811115611b8a57611b8a612c87565b03610bd957600980546001919060ff19168280610b9f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611bd86120e0565b6001600160a01b038116611c3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c4f565b6115258161268b565b6002600954610100900460ff166002811115611c6457611c64612c87565b03611ca85760405162461bcd60e51b81526020600482015260146024820152731c1c9a5d985d19481cd85b195cc818db1bdcd95960621b6044820152606401610c4f565b601a5433600090815260166020526040902054611cc690839061301f565b1115611d285760405162461bcd60e51b815260206004820152602b60248201527f796f75277665206d696e74656420746865206d617820616d6f756e7420666f7260448201526a207468697320706861736560a81b6064820152608401610c4f565b6009546201000090046001600160a01b03166323b872dd3330611d5485683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcc9190613049565b611de85760405162461bcd60e51b8152600401610c4f90613066565b6000600954610100900460ff166002811115611e0657611e06612c87565b03611e85573360009081526013602052604090205460ff161515600114611e805760405162461bcd60e51b815260206004820152602860248201527f796f757265206e6f74206120626967207374616b65722e20636865636b20626160448201526731b5903630ba32b960c11b6064820152608401610c4f565b611f91565b6001600954610100900460ff166002811115611ea357611ea3612c87565b03611f91576009546040516370a0823160e01b815233600482015269021e19e0c9bab2400000916201000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015611f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2491906131fc565b101580611f4557503360009081526014602052604090205460ff1615156001145b611f915760405162461bcd60e51b815260206004820152601f60248201527f6e6f74207374616b696e67206f72206861766520656e6f7567682064696e6f006044820152606401610c4f565b60005b8181101561115b57336000908152601660205260408120805491611fb7836130ab565b9190505550611fca600b80546001019055565b6000611fd5600b5490565b9050611fe13382612671565b601d8054906000611ff1836130ab565b9091555050336000818152601160209081526040808320868452825291829020849055815192835282018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a15080612054816130ab565b915050611f94565b60006001600160e01b0319821663152a902d60e11b1480610aa35750610aa3826127ed565b6000818152600260205260409020546001600160a01b03166115255760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c4f565b6006546001600160a01b03163314610bd95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c4f565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061216f82611736565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006121b382611736565b90506121c381600084600161283d565b6121cc82611736565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600042612259600143613247565b4041336021600081548092919061226f906130ab565b909155506040805160208101969096528501939093526bffffffffffffffffffffffff19606092831b811683860152911b166074830152608882015260a80160408051601f198184030181529190528051602090910120905060006122d560058361325a565b6122e090600161301f565b604051909150339082907fd933fee95bb6b69d695dee98c379b40be4224ae157bd20c84c811d342c6698cc90600090a35b6107d0612339600c612324600185613247565b6005811061233457612334613215565b015490565b101561245e57600061234c600183613247565b612358906107d0613032565b61236390600161301f565b9050600081612378600c612324600187613247565b612382919061301f565b90506123ae600c612394600186613247565b600581106123a4576123a4613215565b0180546001019055565b600a54604051633b59d23f60e11b81526001600160a01b03878116600483015260248201849052909116906376b3a47e90604401600060405180830381600087803b1580156123fc57600080fd5b505af1158015612410573d6000803e3d6000fd5b5050604080516001600160a01b0389168152602081018590527f9addedb16897147b94483a79dbc57752269e8bc2cfd576166828246812fac79c935001905060405180910390a15050505050565b60408051602081018490520160408051601f198184030181529190528051602090910120915061248f60058361325a565b61249a90600161301f565b9050612311565b6000806124ad83611736565b9050806001600160a01b0316846001600160a01b031614806124d457506124d48185611ba2565b806124f85750836001600160a01b03166124ed84610b3b565b6001600160a01b0316145b949350505050565b826001600160a01b031661251382611736565b6001600160a01b0316146125395760405162461bcd60e51b8152600401610c4f9061326e565b6001600160a01b03821661259b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c4f565b6125a8838383600161283d565b826001600160a01b03166125bb82611736565b6001600160a01b0316146125e15760405162461bcd60e51b8152600401610c4f9061326e565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61115b8282604051806020016040528060008152506128c5565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361273e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c4f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127b6848484612500565b6127c2848484846128f8565b6119de5760405162461bcd60e51b8152600401610c4f906132b3565b6060601f8054610ab890612f82565b60006001600160e01b031982166380ac58cd60e01b148061281e57506001600160e01b03198216635b5e139f60e01b145b80610aa357506301ffc9a760e01b6001600160e01b0319831614610aa3565b60018111156119de576001600160a01b03841615612883576001600160a01b0384166000908152600360205260408120805483929061287d908490613247565b90915550505b6001600160a01b038316156119de576001600160a01b038316600090815260036020526040812080548392906128ba90849061301f565b909155505050505050565b6128cf83836129f9565b6128dc60008484846128f8565b610cf05760405162461bcd60e51b8152600401610c4f906132b3565b60006001600160a01b0384163b156129ee57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061293c903390899088908890600401613305565b6020604051808303816000875af1925050508015612977575060408051601f3d908101601f1916820190925261297491810190613342565b60015b6129d4573d8080156129a5576040519150601f19603f3d011682016040523d82523d6000602084013e6129aa565b606091505b5080516000036129cc5760405162461bcd60e51b8152600401610c4f906132b3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506124f8565b506001949350505050565b6001600160a01b038216612a4f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c4f565b6000818152600260205260409020546001600160a01b031615612ab45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c4f565b612ac260008383600161283d565b6000818152600260205260409020546001600160a01b031615612b275760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c4f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461152557600080fd5b600060208284031215612bba57600080fd5b8135611b6281612b92565b60005b83811015612be0578181015183820152602001612bc8565b50506000910152565b60008151808452612c01816020860160208601612bc5565b601f01601f19169290920160200192915050565b602081526000611b626020830184612be9565b600060208284031215612c3a57600080fd5b5035919050565b80356001600160a01b0381168114612c5857600080fd5b919050565b60008060408385031215612c7057600080fd5b612c7983612c41565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612cb157612cb1612c87565b91905290565b600060208284031215612cc957600080fd5b611b6282612c41565b600080600060608486031215612ce757600080fd5b612cf084612c41565b9250612cfe60208501612c41565b9150604084013590509250925092565b60008060408385031215612d2157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d6157612d61612d30565b604051601f8501601f19908116603f01168101908282118183101715612d8957612d89612d30565b81604052809350858152868686011115612da257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612dce57600080fd5b813567ffffffffffffffff811115612de557600080fd5b8201601f81018413612df657600080fd5b6124f884823560208401612d46565b60008060208385031215612e1857600080fd5b823567ffffffffffffffff80821115612e3057600080fd5b818501915085601f830112612e4457600080fd5b813581811115612e5357600080fd5b8660208260051b8501011115612e6857600080fd5b60209290920196919550909350505050565b801515811461152557600080fd5b60008060408385031215612e9b57600080fd5b612ea483612c41565b91506020830135612eb481612e7a565b809150509250929050565b60008060008060808587031215612ed557600080fd5b612ede85612c41565b9350612eec60208601612c41565b925060408501359150606085013567ffffffffffffffff811115612f0f57600080fd5b8501601f81018713612f2057600080fd5b612f2f87823560208401612d46565b91505092959194509250565b6020810160028310612cb157612cb1612c87565b60008060408385031215612f6257600080fd5b612f6b83612c41565b9150612f7960208401612c41565b90509250929050565b600181811c90821680612f9657607f821691505b602082108103612fb657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610aa357610aa3613009565b8082028115828204841417610aa357610aa3613009565b60006020828403121561305b57600080fd5b8151611b6281612e7a565b60208082526025908201527f656974686572206e6f20617070726f76616c206f72206e6f7420656e6f7567686040820152642064696e6f60d81b606082015260800190565b6000600182016130bd576130bd613009565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826130e9576130e96130c4565b500490565b601f821115610cf057600081815260208120601f850160051c810160208610156131155750805b601f850160051c820191505b8181101561313457828155600101613121565b505050505050565b815167ffffffffffffffff81111561315657613156612d30565b61316a816131648454612f82565b846130ee565b602080601f83116001811461319f57600084156131875750858301515b600019600386901b1c1916600185901b178555613134565b600085815260208120601f198616915b828110156131ce578886015182559484019460019091019084016131af565b50858210156131ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561320e57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000825161323d818460208701612bc5565b9190910192915050565b81810381811115610aa357610aa3613009565b600082613269576132696130c4565b500690565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061333890830184612be9565b9695505050505050565b60006020828403121561335457600080fd5b8151611b6281612b9256fea2646970667358221220ec737aad347fd4dd120c3e26d2c63d6effd67cb8835cc72ecdef19a32430a41564736f6c63430008110033000000000000000000000000d373087d8028daa98664589d5182b078a64d7dc200000000000000000000000049642110b712c1fd7261bc074105e9e44676c68f0000000000000000000000007f92573b0bf5834f12cc4f5c00b15a287512ba26000000000000000000000000cfdd9fa39f998440c479e05e2fb2e2f9f2b6ff27
Deployed Bytecode
0x6080604052600436106103505760003560e01c80636c0360eb116101c6578063a65b5da3116100f7578063dad3ccad11610095578063f2fde38b1161006f578063f2fde38b146109e8578063f4201c3c14610a08578063f69adce614610a38578063f87fdf2714610a5e57600080fd5b8063dad3ccad1461099d578063e1575364146109b3578063e985e9c5146109c857600080fd5b8063beff1a3a116100d1578063beff1a3a14610906578063c3d1b9d214610926578063c87b56dd14610956578063d412b0b11461097657600080fd5b8063a65b5da3146108a1578063b88d4fde146108d1578063bb18d542146108f157600080fd5b806389240de21161016457806396330b5f1161013e57806396330b5f14610811578063a22cb4651461083e578063a2309ff81461085e578063a27448831461087457600080fd5b806389240de2146107be5780638da5cb5b146107de57806395d89b41146107fc57600080fd5b80637362377b116101a05780637362377b146107525780637f4093ec1461076757806381ca8d4c1461077e5780638811dc131461079e57600080fd5b80636c0360eb1461070857806370a082311461071d578063715018a61461073d57600080fd5b80632a55205a116102a05780634615de281161023e57806359dccb621161021857806359dccb62146106935780636322e237146106a85780636352211e146106c857806369088f71146106e857600080fd5b80634615de28146106265780634f3c5f061461063b57806355f804b31461067357600080fd5b80633a0227781161027a5780633a022778146105b057806342842e0e146105c657806342966c68146105e657806344a0d68a1461060657600080fd5b80632a55205a1461053b5780632c86e5ba1461057a5780632db115441461059057600080fd5b80630c3f6acf1161030d5780632385554c116102e75780632385554c146104c857806323b872dd146104db57806323ecdd3a146104fb578063271c85c21461051b57600080fd5b80630c3f6acf1461043f57806311dceda71461046b578063124fb53c1461049857600080fd5b806301ffc9a71461035557806305e4f70b1461038a57806306fdde03146103ae578063081812fc146103d057806308956f2b14610408578063095ea7b31461041f575b600080fd5b34801561036157600080fd5b50610375610370366004612ba8565b610a7e565b60405190151581526020015b60405180910390f35b34801561039657600080fd5b506103a0601c5481565b604051908152602001610381565b3480156103ba57600080fd5b506103c3610aa9565b6040516103819190612c15565b3480156103dc57600080fd5b506103f06103eb366004612c28565b610b3b565b6040516001600160a01b039091168152602001610381565b34801561041457600080fd5b5061041d610b62565b005b34801561042b57600080fd5b5061041d61043a366004612c5d565b610bdb565b34801561044b57600080fd5b5060095461045e90610100900460ff1681565b6040516103819190612c9d565b34801561047757600080fd5b506103a0610486366004612cb7565b60156020526000908152604090205481565b3480156104a457600080fd5b506103756104b3366004612cb7565b60146020526000908152604090205460ff1681565b61041d6104d6366004612c28565b610cf5565b3480156104e757600080fd5b5061041d6104f6366004612cd2565b610e99565b34801561050757600080fd5b5061041d610516366004612c28565b610ecb565b34801561052757600080fd5b5061041d610536366004612c28565b610ed8565b34801561054757600080fd5b5061055b610556366004612d0e565b61115f565b604080516001600160a01b039093168352602083019190915201610381565b34801561058657600080fd5b506103a060195481565b34801561059c57600080fd5b5061041d6105ab366004612c28565b61120b565b3480156105bc57600080fd5b506103a0601a5481565b3480156105d257600080fd5b5061041d6105e1366004612cd2565b6114dc565b3480156105f257600080fd5b5061041d610601366004612c28565b6114f7565b34801561061257600080fd5b5061041d610621366004612c28565b611528565b34801561063257600080fd5b5061041d611535565b34801561064757600080fd5b506103a0610656366004612c5d565b601160209081526000928352604080842090915290825290205481565b34801561067f57600080fd5b5061041d61068e366004612dbc565b6115af565b34801561069f57600080fd5b5061041d6115c3565b3480156106b457600080fd5b5061041d6106c3366004612e05565b6116bc565b3480156106d457600080fd5b506103f06106e3366004612c28565b611736565b3480156106f457600080fd5b5061041d610703366004612e05565b611796565b34801561071457600080fd5b506103c3611810565b34801561072957600080fd5b506103a0610738366004612cb7565b61189e565b34801561074957600080fd5b5061041d611924565b34801561075e57600080fd5b5061041d611936565b34801561077357600080fd5b50600b546103a09081565b34801561078a57600080fd5b5061041d610799366004612c28565b611978565b3480156107aa57600080fd5b5061041d6107b9366004612c28565b611985565b3480156107ca57600080fd5b50600a546103f0906001600160a01b031681565b3480156107ea57600080fd5b506006546001600160a01b03166103f0565b34801561080857600080fd5b506103c3611992565b34801561081d57600080fd5b506103a061082c366004612cb7565b60176020526000908152604090205481565b34801561084a57600080fd5b5061041d610859366004612e88565b6119a1565b34801561086a57600080fd5b506103a0601d5481565b34801561088057600080fd5b506103a061088f366004612cb7565b60166020526000908152604090205481565b3480156108ad57600080fd5b506103756108bc366004612cb7565b60136020526000908152604090205460ff1681565b3480156108dd57600080fd5b5061041d6108ec366004612ebf565b6119ac565b3480156108fd57600080fd5b5061041d6119e4565b34801561091257600080fd5b5061041d610921366004612e05565b611a1e565b34801561093257600080fd5b50610375610941366004612c28565b60186020526000908152604090205460ff1681565b34801561096257600080fd5b506103c3610971366004612c28565b611a98565b34801561098257600080fd5b506009546109909060ff1681565b6040516103819190612f3b565b3480156109a957600080fd5b506103a0601b5481565b3480156109bf57600080fd5b5061041d611b69565b3480156109d457600080fd5b506103756109e3366004612f4f565b611ba2565b3480156109f457600080fd5b5061041d610a03366004612cb7565b611bd0565b348015610a1457600080fd5b50610375610a23366004612cb7565b60126020526000908152604090205460ff1681565b348015610a4457600080fd5b506009546103f0906201000090046001600160a01b031681565b348015610a6a57600080fd5b5061041d610a79366004612c28565b611c46565b60006001600160e01b0319821663152a902d60e11b1480610aa35750610aa38261205c565b92915050565b606060008054610ab890612f82565b80601f0160208091040260200160405190810160405280929190818152602001828054610ae490612f82565b8015610b315780601f10610b0657610100808354040283529160200191610b31565b820191906000526020600020905b815481529060010190602001808311610b1457829003601f168201915b5050505050905090565b6000610b4682612081565b506000908152600460205260409020546001600160a01b031690565b610b6a6120e0565b6000600954610100900460ff166002811115610b8857610b88612c87565b03610ba657600980546001919061ff001916610100835b0217905550565b6001600954610100900460ff166002811115610bc457610bc4612c87565b03610bd9576009805461ff0019166102001790555b565b6000610be682611736565b9050806001600160a01b0316836001600160a01b031603610c585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610c745750610c748133611ba2565b610ce65760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610c4f565b610cf0838361213a565b505050565b33610cff82611736565b6001600160a01b031614610d495760405162461bcd60e51b81526020600482015260116024820152707768617420617265207520646f696e673f60781b6044820152606401610c4f565b600160095460ff166001811115610d6257610d62612c87565b14610dba5760405162461bcd60e51b815260206004820152602260248201527f697473206e6f742074696d6520746f20686174636820796f7572206567672079604482015261195d60f21b6064820152608401610c4f565b602054341015610e045760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b9bdd59da08195d1a195c881cd95b9d605a1b6044820152606401610c4f565b610e0d816121a8565b600081815260186020908152604091829020805460ff1916600117905581513381529081018390527f723e2d6e31cba83ca74a92e737009ce38f33d6fd3799dc57e33311125c142ec9910160405180910390a1610e693361224b565b604051339082907f35c632a45238198d080cde061350900f6d1b862bce1a07f7e8012cfe51394acf90600090a350565b610ea4335b826124a1565b610ec05760405162461bcd60e51b8152600401610c4f90612fbc565b610cf0838383612500565b610ed36120e0565b601c55565b3360009081526012602052604090205460ff161515600114610f505760405162461bcd60e51b815260206004820152602b60248201527f796f7527726520757020746f206e6f20676f6f6420696620796f75277265207360448201526a32b2b4b733903a3434b99760a91b6064820152608401610c4f565b60195433600090815260156020526040902054610f6e90839061301f565b1115610fcf5760405162461bcd60e51b815260206004820152602a60248201527f74686174277320616c6c20796f75206765742066726f6d2074686973206d696e6044820152693a10333ab731ba34b7b760b11b6064820152608401610c4f565b6009546201000090046001600160a01b03166323b872dd3330610ffb85683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561104f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110739190613049565b61108f5760405162461bcd60e51b8152600401610c4f90613066565b60005b8181101561115b576110a8600b80546001019055565b60006110b3600b5490565b3360009081526015602052604081208054929350906110d1836130ab565b91905055506110e03382612671565b601d80549060006110f0836130ab565b909155505060408051338152602081018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a133600090815260116020908152604080832085845290915290205580611153816130ab565b915050611092565b5050565b60008281526008602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916111d45750604080518082019091526007546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906111f3906001600160601b031687613032565b6111fd91906130da565b915196919550909350505050565b6000600954610100900460ff16600281111561122957611229612c87565b1415801561125357506001600954610100900460ff16600281111561125057611250612c87565b14155b61129f5760405162461bcd60e51b815260206004820152601f60248201527f7075626c69632073616c6520686173206e6f74206f70656e6564207965742e006044820152606401610c4f565b601e54600b5411156112e55760405162461bcd60e51b815260206004820152600f60248201526e36b0bc1039bab838363c9036b2ba1760891b6044820152606401610c4f565b6009546201000090046001600160a01b03166323b872dd333061131185683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611365573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113899190613049565b6113a55760405162461bcd60e51b8152600401610c4f90613066565b601b54336000908152601760205260409020546113c390839061301f565b11156114115760405162461bcd60e51b815260206004820152601c60248201527f796f75277665206d696e746564206d617820666f72207075626c6963000000006044820152606401610c4f565b60005b8181101561115b57336000908152601760205260408120805491611437836130ab565b919050555061144a600b80546001019055565b6000611455600b5490565b90506114613382612671565b601d8054906000611471836130ab565b9091555050336000818152601160209081526040808320868452825291829020849055815192835282018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a150806114d4816130ab565b915050611414565b610cf0838383604051806020016040528060008152506119ac565b61150033610e9e565b61151c5760405162461bcd60e51b8152600401610c4f90612fbc565b611525816121a8565b50565b6115306120e0565b602055565b61153d6120e0565b6002600954610100900460ff16600281111561155b5761155b612c87565b0361157657600980546001919061ff00191661010083610b9f565b6001600954610100900460ff16600281111561159457611594612c87565b03610bd957600980546000919061ff00191661010083610b9f565b6115b76120e0565b601f61115b828261313c565b6115cb6120e0565b6009546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a0823190602401602060405180830381865afa15801561161a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163e91906131fc565b60095460405163a9059cbb60e01b815261dead6004820152602481018390529192506201000090046001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015611698573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115b9190613049565b6116c46120e0565b60005b81811015610cf0576001601460008585858181106116e7576116e7613215565b90506020020160208101906116fc9190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061172e816130ab565b9150506116c7565b6000818152600260205260408120546001600160a01b031680610aa35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c4f565b61179e6120e0565b60005b81811015610cf0576001601260008585858181106117c1576117c1613215565b90506020020160208101906117d69190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611808816130ab565b9150506117a1565b601f805461181d90612f82565b80601f016020809104026020016040519081016040528092919081815260200182805461184990612f82565b80156118965780601f1061186b57610100808354040283529160200191611896565b820191906000526020600020905b81548152906001019060200180831161187957829003601f168201915b505050505081565b60006001600160a01b0382166119085760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610c4f565b506001600160a01b031660009081526003602052604090205490565b61192c6120e0565b610bd9600061268b565b61193e6120e0565b60225460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561115b573d6000803e3d6000fd5b6119806120e0565b601a55565b61198d6120e0565b601b55565b606060018054610ab890612f82565b61115b3383836126dd565b6119b633836124a1565b6119d25760405162461bcd60e51b8152600401610c4f90612fbc565b6119de848484846127ab565b50505050565b6119ec6120e0565b600160095460ff166001811115611a0557611a05612c87565b03610bd957600980546000919060ff1916600183610b9f565b611a266120e0565b60005b81811015610cf057600160136000858585818110611a4957611a49613215565b9050602002016020810190611a5e9190612cb7565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611a90816130ab565b915050611a29565b6000818152600260205260409020546060906001600160a01b0316611b175760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610c4f565b6000611b216127de565b90506000815111611b415760405180602001604052806000815250611b62565b80604051602001611b52919061322b565b6040516020818303038152906040525b9392505050565b611b716120e0565b600060095460ff166001811115611b8a57611b8a612c87565b03610bd957600980546001919060ff19168280610b9f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611bd86120e0565b6001600160a01b038116611c3d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c4f565b6115258161268b565b6002600954610100900460ff166002811115611c6457611c64612c87565b03611ca85760405162461bcd60e51b81526020600482015260146024820152731c1c9a5d985d19481cd85b195cc818db1bdcd95960621b6044820152606401610c4f565b601a5433600090815260166020526040902054611cc690839061301f565b1115611d285760405162461bcd60e51b815260206004820152602b60248201527f796f75277665206d696e74656420746865206d617820616d6f756e7420666f7260448201526a207468697320706861736560a81b6064820152608401610c4f565b6009546201000090046001600160a01b03166323b872dd3330611d5485683635c9adc5dea00000613032565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611da8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcc9190613049565b611de85760405162461bcd60e51b8152600401610c4f90613066565b6000600954610100900460ff166002811115611e0657611e06612c87565b03611e85573360009081526013602052604090205460ff161515600114611e805760405162461bcd60e51b815260206004820152602860248201527f796f757265206e6f74206120626967207374616b65722e20636865636b20626160448201526731b5903630ba32b960c11b6064820152608401610c4f565b611f91565b6001600954610100900460ff166002811115611ea357611ea3612c87565b03611f91576009546040516370a0823160e01b815233600482015269021e19e0c9bab2400000916201000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015611f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2491906131fc565b101580611f4557503360009081526014602052604090205460ff1615156001145b611f915760405162461bcd60e51b815260206004820152601f60248201527f6e6f74207374616b696e67206f72206861766520656e6f7567682064696e6f006044820152606401610c4f565b60005b8181101561115b57336000908152601660205260408120805491611fb7836130ab565b9190505550611fca600b80546001019055565b6000611fd5600b5490565b9050611fe13382612671565b601d8054906000611ff1836130ab565b9091555050336000818152601160209081526040808320868452825291829020849055815192835282018390527fc12d315b94d08cc6b703f80b8e43c74fd2b4952f4061124610356132d88c1132910160405180910390a15080612054816130ab565b915050611f94565b60006001600160e01b0319821663152a902d60e11b1480610aa35750610aa3826127ed565b6000818152600260205260409020546001600160a01b03166115255760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610c4f565b6006546001600160a01b03163314610bd95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c4f565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061216f82611736565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006121b382611736565b90506121c381600084600161283d565b6121cc82611736565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600042612259600143613247565b4041336021600081548092919061226f906130ab565b909155506040805160208101969096528501939093526bffffffffffffffffffffffff19606092831b811683860152911b166074830152608882015260a80160408051601f198184030181529190528051602090910120905060006122d560058361325a565b6122e090600161301f565b604051909150339082907fd933fee95bb6b69d695dee98c379b40be4224ae157bd20c84c811d342c6698cc90600090a35b6107d0612339600c612324600185613247565b6005811061233457612334613215565b015490565b101561245e57600061234c600183613247565b612358906107d0613032565b61236390600161301f565b9050600081612378600c612324600187613247565b612382919061301f565b90506123ae600c612394600186613247565b600581106123a4576123a4613215565b0180546001019055565b600a54604051633b59d23f60e11b81526001600160a01b03878116600483015260248201849052909116906376b3a47e90604401600060405180830381600087803b1580156123fc57600080fd5b505af1158015612410573d6000803e3d6000fd5b5050604080516001600160a01b0389168152602081018590527f9addedb16897147b94483a79dbc57752269e8bc2cfd576166828246812fac79c935001905060405180910390a15050505050565b60408051602081018490520160408051601f198184030181529190528051602090910120915061248f60058361325a565b61249a90600161301f565b9050612311565b6000806124ad83611736565b9050806001600160a01b0316846001600160a01b031614806124d457506124d48185611ba2565b806124f85750836001600160a01b03166124ed84610b3b565b6001600160a01b0316145b949350505050565b826001600160a01b031661251382611736565b6001600160a01b0316146125395760405162461bcd60e51b8152600401610c4f9061326e565b6001600160a01b03821661259b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610c4f565b6125a8838383600161283d565b826001600160a01b03166125bb82611736565b6001600160a01b0316146125e15760405162461bcd60e51b8152600401610c4f9061326e565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61115b8282604051806020016040528060008152506128c5565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03160361273e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c4f565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6127b6848484612500565b6127c2848484846128f8565b6119de5760405162461bcd60e51b8152600401610c4f906132b3565b6060601f8054610ab890612f82565b60006001600160e01b031982166380ac58cd60e01b148061281e57506001600160e01b03198216635b5e139f60e01b145b80610aa357506301ffc9a760e01b6001600160e01b0319831614610aa3565b60018111156119de576001600160a01b03841615612883576001600160a01b0384166000908152600360205260408120805483929061287d908490613247565b90915550505b6001600160a01b038316156119de576001600160a01b038316600090815260036020526040812080548392906128ba90849061301f565b909155505050505050565b6128cf83836129f9565b6128dc60008484846128f8565b610cf05760405162461bcd60e51b8152600401610c4f906132b3565b60006001600160a01b0384163b156129ee57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061293c903390899088908890600401613305565b6020604051808303816000875af1925050508015612977575060408051601f3d908101601f1916820190925261297491810190613342565b60015b6129d4573d8080156129a5576040519150601f19603f3d011682016040523d82523d6000602084013e6129aa565b606091505b5080516000036129cc5760405162461bcd60e51b8152600401610c4f906132b3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506124f8565b506001949350505050565b6001600160a01b038216612a4f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c4f565b6000818152600260205260409020546001600160a01b031615612ab45760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c4f565b612ac260008383600161283d565b6000818152600260205260409020546001600160a01b031615612b275760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c4f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461152557600080fd5b600060208284031215612bba57600080fd5b8135611b6281612b92565b60005b83811015612be0578181015183820152602001612bc8565b50506000910152565b60008151808452612c01816020860160208601612bc5565b601f01601f19169290920160200192915050565b602081526000611b626020830184612be9565b600060208284031215612c3a57600080fd5b5035919050565b80356001600160a01b0381168114612c5857600080fd5b919050565b60008060408385031215612c7057600080fd5b612c7983612c41565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310612cb157612cb1612c87565b91905290565b600060208284031215612cc957600080fd5b611b6282612c41565b600080600060608486031215612ce757600080fd5b612cf084612c41565b9250612cfe60208501612c41565b9150604084013590509250925092565b60008060408385031215612d2157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d6157612d61612d30565b604051601f8501601f19908116603f01168101908282118183101715612d8957612d89612d30565b81604052809350858152868686011115612da257600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612dce57600080fd5b813567ffffffffffffffff811115612de557600080fd5b8201601f81018413612df657600080fd5b6124f884823560208401612d46565b60008060208385031215612e1857600080fd5b823567ffffffffffffffff80821115612e3057600080fd5b818501915085601f830112612e4457600080fd5b813581811115612e5357600080fd5b8660208260051b8501011115612e6857600080fd5b60209290920196919550909350505050565b801515811461152557600080fd5b60008060408385031215612e9b57600080fd5b612ea483612c41565b91506020830135612eb481612e7a565b809150509250929050565b60008060008060808587031215612ed557600080fd5b612ede85612c41565b9350612eec60208601612c41565b925060408501359150606085013567ffffffffffffffff811115612f0f57600080fd5b8501601f81018713612f2057600080fd5b612f2f87823560208401612d46565b91505092959194509250565b6020810160028310612cb157612cb1612c87565b60008060408385031215612f6257600080fd5b612f6b83612c41565b9150612f7960208401612c41565b90509250929050565b600181811c90821680612f9657607f821691505b602082108103612fb657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610aa357610aa3613009565b8082028115828204841417610aa357610aa3613009565b60006020828403121561305b57600080fd5b8151611b6281612e7a565b60208082526025908201527f656974686572206e6f20617070726f76616c206f72206e6f7420656e6f7567686040820152642064696e6f60d81b606082015260800190565b6000600182016130bd576130bd613009565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826130e9576130e96130c4565b500490565b601f821115610cf057600081815260208120601f850160051c810160208610156131155750805b601f850160051c820191505b8181101561313457828155600101613121565b505050505050565b815167ffffffffffffffff81111561315657613156612d30565b61316a816131648454612f82565b846130ee565b602080601f83116001811461319f57600084156131875750858301515b600019600386901b1c1916600185901b178555613134565b600085815260208120601f198616915b828110156131ce578886015182559484019460019091019084016131af565b50858210156131ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561320e57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000825161323d818460208701612bc5565b9190910192915050565b81810381811115610aa357610aa3613009565b600082613269576132696130c4565b500690565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061333890830184612be9565b9695505050505050565b60006020828403121561335457600080fd5b8151611b6281612b9256fea2646970667358221220ec737aad347fd4dd120c3e26d2c63d6effd67cb8835cc72ecdef19a32430a41564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d373087d8028daa98664589d5182b078a64d7dc200000000000000000000000049642110b712c1fd7261bc074105e9e44676c68f0000000000000000000000007f92573b0bf5834f12cc4f5c00b15a287512ba26000000000000000000000000cfdd9fa39f998440c479e05e2fb2e2f9f2b6ff27
-----Decoded View---------------
Arg [0] : dino (address): 0xD373087d8028DaA98664589d5182B078A64D7dc2
Arg [1] : _dinoToken (address): 0x49642110B712C1FD7261Bc074105E9E44676c68F
Arg [2] : _royaltyWallet (address): 0x7F92573b0bf5834F12cC4f5C00B15A287512bA26
Arg [3] : _dinoWallet (address): 0xCfDd9Fa39F998440c479E05E2Fb2e2F9F2B6Ff27
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000d373087d8028daa98664589d5182b078a64d7dc2
Arg [1] : 00000000000000000000000049642110b712c1fd7261bc074105e9e44676c68f
Arg [2] : 0000000000000000000000007f92573b0bf5834f12cc4f5c00b15a287512ba26
Arg [3] : 000000000000000000000000cfdd9fa39f998440c479e05e2fb2e2f9f2b6ff27
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.