ERC-721
Overview
Max Total Supply
766 LL
Holders
219
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 LLLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Llama
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract Llama is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ReentrancyGuard, VRFConsumerBase { using Counters for Counters.Counter; using SafeMath for uint256; Counters.Counter private _tokenIdCounter; uint256 private unitCost; uint256 private _maxPurchase; uint256 private _maxTokens; string _folderPath; bool _saleComplete; address _devAddress; uint256 public LastLottoDraw; uint256 public NextLottoDraw; bytes32 internal keyHash; uint256 internal fee; uint256 public randomResult; uint256 public CurrentJackpotInWei; uint256 public TotalJackpotInWei; uint256 private maxJackpotInWei; event CloseSale(address indexed _from); event OpenSale(address indexed _from); event PrizeWon(address indexed _winner, uint256 _prize, uint256 _rank, uint256 _tokenId); mapping(address => uint256) public WhiteList; bool private OnlyWhiteList; constructor() VRFConsumerBase( 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator - 0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B 0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token - 0x01BE23585060835E02B77ef475b0Cc51aA1e0709 ) ERC721("Lotto Llamas", "LL") { keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; //0x2ed0feb3e7fd2022120aa84fab1945545a9f2ffc9076fd6156fa96eaff4c1311 fee = 2 * 10 ** 18; // 0.1 LINK (Varies by network) unitCost = 0.0777 ether; //start price - 0.0777 ether _maxPurchase = 20; _maxTokens = 10000; _saleComplete = false; _tokenIdCounter.increment(); //first token is ID 1 OnlyWhiteList = true; _pause(); } function updateLinkFee(uint256 _fee) public onlyOwner{ fee = _fee; } function updateLinkKeyhash(bytes32 _keyHash) public onlyOwner{ keyHash = _keyHash; } function toggleWhitelist() public onlyOwner { OnlyWhiteList = !OnlyWhiteList; } function addWhitelist(address[] memory addresses) public onlyOwner { for(uint256 i; i < addresses.length; i++){ WhiteList[addresses[i]] = 2; } } function devMint(address to, uint256 numberToMint) public onlyOwner onSale nonReentrant { require(_tokenIdCounter.current() <= _maxTokens, "Sold out!!"); require(paused(), "Can only dev mint when contract is paused"); _unpause(); uint256 i = 0; do { _safeMint(to, _tokenIdCounter.current()); _tokenIdCounter.increment(); i++; } while (i < numberToMint && i < _maxPurchase); //can only mint a max of whatever the max public purchase is per transaction pause(); } function drawLotto() public onlyOwner nonReentrant{ require(randomResult > 0, "Set random seed first"); require(block.timestamp > NextLottoDraw, "Too early for this lotto draw"); require(address(this).balance >= CurrentJackpotInWei, "Not enough eth to pay jackpot"); LastLottoDraw = block.timestamp; NextLottoDraw = block.timestamp.add(2419200); //next draw must be 28 days after the previous one (28 * 24 * 60 * 60) lottoTime(CurrentJackpotInWei); randomResult = 0; //reset seed for the next draw } //remove this before mainnet deployment /* function setNextLottoDraw(uint256 nextLottoTimestamp) public onlyOwner { NextLottoDraw = nextLottoTimestamp; }*/ //just have this method so we can check that chainlink is working correctly //before starting minting. Can't reset seed after 500 llamas have been minted. function resetSeed() public onlyOwner { require(randomResult != 0, "seed is already 0"); require(_tokenIdCounter.current() < 500, "Cannot reset seed"); randomResult = 0; } function isSeedSet() public view returns(bool isSet){ isSet = (randomResult != 0); } function lottoTime(uint256 jackpot) private { TotalJackpotInWei = TotalJackpotInWei.sub(jackpot); uint256 share = jackpot.div(100); uint256[10] memory prizes = [share.mul(40) //40% first prize , share.mul(10), share.mul(10), share.mul(10), share.mul(10) //10% 2nd - 5th prize , share.mul(4), share.mul(4), share.mul(4), share.mul(4), share.mul(4)]; //4% 5th - 10th prize uint256 maxNumber = totalSupply(); //totalSupply() uint256[] memory winners = currentWinners(prizes.length, maxNumber); for(uint256 i = 0; i < prizes.length; i++){ uint256 winner = winners[i]; //all the testing there was never a winner outside of the range.. //but better safe than sorry. if (winner > 0 && winner <= maxNumber) { address winner_addy = ownerOf(winner); payable(winner_addy).transfer(prizes[i]); emit PrizeWon(winner_addy, prizes[i], i, winner); } } } function currentWinners(uint256 n, uint256 maxNumber) private view returns (uint256[] memory expandedValues) { expandedValues = new uint256[](n); for (uint256 i = 0; i < n; i++) { expandedValues[i] = (uint256(keccak256(abi.encode(randomResult, i)))% maxNumber).add(1) ; } return expandedValues; } function pause() public onlyOwner onSale { _pause(); } function startSaleOrUpdateUrl(string memory folderPath) public onlyOwner onSale { _folderPath = folderPath; if (paused()){ _unpause(); emit OpenSale(msg.sender); } } function updateBaseUri(string memory folderPath) public onlyOwner onSale { _folderPath = folderPath; } function _baseURI() internal view override returns (string memory) { return _folderPath; } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function updateUnitPrice(uint256 unitPrice) public onlyOwner { unitCost = unitPrice; } function mintLlama(uint256 numberToMint) public payable nonReentrant whenNotPaused { require(numberToMint > 0 && numberToMint <= _maxPurchase, "Invalid mint amount"); require(_tokenIdCounter.current() <= _maxTokens, "Sold out!!"); require(msg.value == numberToMint.mul(unitCost), "Incorrect ETH amount"); require(!OnlyWhiteList || WhiteList[msg.sender] >= numberToMint); require(numberToMint.add(balanceOf(msg.sender)) <= 200 || owner() == msg.sender, "max wallet limiter turned on for testing!!"); uint256 i = 0; do { i++; _safeMint(msg.sender, _tokenIdCounter.current()); _tokenIdCounter.increment(); } while (i < numberToMint && _tokenIdCounter.current() <= _maxTokens); uint256 jp = unitCost.mul(i).div(100).mul(36); //fixed 36% jackpot cut TotalJackpotInWei = TotalJackpotInWei.add(jp); if (numberToMint.sub(i) > 0){ //return any overspent funds for the last buyer payable(msg.sender).transfer(numberToMint.sub(i).mul(unitCost)); } if(OnlyWhiteList){ WhiteList[msg.sender] = WhiteList[msg.sender].sub(numberToMint); } } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function withdraw() public onlyOwner { uint256 balance = address(this).balance; require(balance.sub(TotalJackpotInWei) > 0, '"No funds available to withdraw'); payable(msg.sender).transfer(balance.sub(TotalJackpotInWei)); } //withdraw link or any other ERC tokens function withdrawTokens(IERC20 token) public onlyOwner { require(address(token) != address(0)); uint256 balance = token.balanceOf(address(this)); token.transfer(msg.sender, balance); } function endSale() public onlyOwner onSale { require(!paused(), "cannot close sale whilst paused"); require(_maxTokens == totalSupply(), "cannot close sale before it's sold out"); // once this action is completed the base URI cannot be changed // and contract cannot be paused. _saleComplete = true; emit CloseSale(msg.sender); } modifier onSale() { require(!_saleComplete, "Sale closed. Action cannot be completed"); _; } function setCurrentJackpot(uint256 _currentJackpotInWei) public onlyOwner { CurrentJackpotInWei = _currentJackpotInWei; } //not onlyOwner.. Anyone can add money to the jackpot function topUpJackpot() public payable nonReentrant { TotalJackpotInWei = TotalJackpotInWei.add(msg.value); } function setLottoSeed() public onlyOwner returns (bytes32 requestId) { require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract"); require(randomResult == 0, "Cannot set lotto seed if it is already set"); return requestRandomness(keyHash, fee); } function getProjectData() public view returns (bool _onlyWhiteList, uint256 _unitCost, uint256 _currentJackpot, uint256 _totalJackpot, uint256 _nextLottoTimestamp, uint256 _totalSupply, bool _isPaused) { _currentJackpot = CurrentJackpotInWei; _totalJackpot = TotalJackpotInWei; _nextLottoTimestamp = NextLottoDraw; _isPaused = paused(); _totalSupply = totalSupply(); _unitCost = unitCost; _onlyWhiteList = OnlyWhiteList; } /** * Callback function used by VRF Coordinator */ function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { randomResult = randomness; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/LinkTokenInterface.sol"; import "./VRFRequestIDBase.sol"; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constuctor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator, _link) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash), and have told you the minimum LINK * @dev price for VRF service. Make sure your contract has sufficient LINK, and * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you * @dev want to generate randomness from. * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomness method. * * @dev The randomness argument to fulfillRandomness is the actual random value * @dev generated from your seed. * * @dev The requestId argument is generated from the keyHash and the seed by * @dev makeRequestId(keyHash, seed). If your contract could have concurrent * @dev requests open, you can use the requestId to track which seed is * @dev associated with which randomness. See VRFRequestIDBase.sol for more * @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously.) * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. (Which is critical to making unpredictable randomness! See the * @dev next section.) * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the ultimate input to the VRF is mixed with the block hash of the * @dev block in which the request is made, user-provided seeds have no impact * @dev on its economic security properties. They are only included for API * @dev compatability with previous versions of this contract. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. */ abstract contract VRFConsumerBase is VRFRequestIDBase { /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBase expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomness the VRF output */ function fulfillRandomness( bytes32 requestId, uint256 randomness ) internal virtual; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 constant private USER_SEED_PLACEHOLDER = 0; /** * @notice requestRandomness initiates a request for VRF output given _seed * * @dev The fulfillRandomness method receives the output, once it's provided * @dev by the Oracle, and verified by the vrfCoordinator. * * @dev The _keyHash must already be registered with the VRFCoordinator, and * @dev the _fee must exceed the fee specified during registration of the * @dev _keyHash. * * @dev The _seed parameter is vestigial, and is kept only for API * @dev compatibility with older versions. It can't *hurt* to mix in some of * @dev your own randomness, here, but it's not necessary because the VRF * @dev oracle will mix the hash of the block containing your request into the * @dev VRF seed it ultimately uses. * * @param _keyHash ID of public key against which randomness is generated * @param _fee The amount of LINK to send with the request * * @return requestId unique ID for this request * * @dev The returned requestId can be used to distinguish responses to * @dev concurrent requests. It is passed as the first argument to * @dev fulfillRandomness. */ function requestRandomness( bytes32 _keyHash, uint256 _fee ) internal returns ( bytes32 requestId ) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // This is the seed passed to VRFCoordinator. The oracle will mix this with // the hash of the block containing this request to obtain the seed/input // which is finally passed to the VRF cryptographic machinery. uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]); // nonces[_keyHash] must stay in sync with // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest). // This provides protection against the user repeating their input seed, // which would result in a predictable/duplicate output, if multiple such // requests appeared in the same block. nonces[_keyHash] = nonces[_keyHash] + 1; return makeRequestId(_keyHash, vRFSeed); } LinkTokenInterface immutable internal LINK; address immutable private vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces; /** * @param _vrfCoordinator address of VRFCoordinator contract * @param _link address of LINK token contract * * @dev https://docs.chain.link/docs/link-token-contracts */ constructor( address _vrfCoordinator, address _link ) { vrfCoordinator = _vrfCoordinator; LINK = LinkTokenInterface(_link); } // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomness( bytes32 requestId, uint256 randomness ) external { require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill"); fulfillRandomness(requestId, randomness); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. 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; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden * in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { // solhint-disable-next-line no-inline-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract VRFRequestIDBase { /** * @notice returns the seed which is actually input to the VRF coordinator * * @dev To prevent repetition of VRF output due to repetition of the * @dev user-supplied seed, that seed is combined in a hash with the * @dev user-specific nonce, and the address of the consuming contract. The * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in * @dev the final seed, but the nonce does protect against repetition in * @dev requests which are included in a single block. * * @param _userSeed VRF seed input provided by user * @param _requester Address of the requesting contract * @param _nonce User-specific nonce at the time of the request */ function makeVRFInputSeed( bytes32 _keyHash, uint256 _userSeed, address _requester, uint256 _nonce ) internal pure returns ( uint256 ) { return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce))); } /** * @notice Returns the id for this request * @param _keyHash The serviceAgreement ID to be used for this request * @param _vRFInputSeed The seed to be passed directly to the VRF * @return The id for this request * * @dev Note that _vRFInputSeed is not the seed passed by the consuming * @dev contract, but the one generated by makeVRFInputSeed */ function makeRequestId( bytes32 _keyHash, uint256 _vRFInputSeed ) internal pure returns ( bytes32 ) { return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance( address owner, address spender ) external view returns ( uint256 remaining ); function approve( address spender, uint256 value ) external returns ( bool success ); function balanceOf( address owner ) external view returns ( uint256 balance ); function decimals() external view returns ( uint8 decimalPlaces ); function decreaseApproval( address spender, uint256 addedValue ) external returns ( bool success ); function increaseApproval( address spender, uint256 subtractedValue ) external; function name() external view returns ( string memory tokenName ); function symbol() external view returns ( string memory tokenSymbol ); function totalSupply() external view returns ( uint256 totalTokensIssued ); function transfer( address to, uint256 value ) external returns ( bool success ); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns ( bool success ); function transferFrom( address from, address to, uint256 value ) external returns ( bool success ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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":"_from","type":"address"}],"name":"CloseSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"}],"name":"OpenSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_prize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_rank","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"PrizeWon","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CurrentJackpotInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LastLottoDraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NextLottoDraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TotalJackpotInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"WhiteList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addWhitelist","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"numberToMint","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"drawLotto","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProjectData","outputs":[{"internalType":"bool","name":"_onlyWhiteList","type":"bool"},{"internalType":"uint256","name":"_unitCost","type":"uint256"},{"internalType":"uint256","name":"_currentJackpot","type":"uint256"},{"internalType":"uint256","name":"_totalJackpot","type":"uint256"},{"internalType":"uint256","name":"_nextLottoTimestamp","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"bool","name":"_isPaused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSeedSet","outputs":[{"internalType":"bool","name":"isSet","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberToMint","type":"uint256"}],"name":"mintLlama","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomResult","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"uint256","name":"_currentJackpotInWei","type":"uint256"}],"name":"setCurrentJackpot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setLottoSeed","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"folderPath","type":"string"}],"name":"startSaleOrUpdateUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"topUpJackpot","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"folderPath","type":"string"}],"name":"updateBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"updateLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"name":"updateLinkKeyhash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unitPrice","type":"uint256"}],"name":"updateUnitPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604080518082018252600c81526b4c6f74746f204c6c616d617360a01b602080830191825283518085019094526002845261131360f21b90840152815173f0d54349addcf704f77ae15b96510dea15cb79529373514910771af9ca656af840dff83e8264ecf986ca939290916200008c9160009162000234565b508051620000a290600190602084019062000234565b5050600b80546001600160a81b0319163361010081029190911790915560405190915081906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600c556001600160a01b0391821660a052166080527faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445601655671bc16d674ec800006017556701140bbd030c4000600f5560146010556127106011556013805460ff1916905562000170600e6200018d602090811b62001f4717901c565b601d805460ff191660011790556200018762000196565b62000317565b80546001019055565b600b5460ff1615620001e15760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620002173390565b6040516001600160a01b03909116815260200160405180910390a1565b8280546200024290620002da565b90600052602060002090601f016020900481019282620002665760008555620002b1565b82601f106200028157805160ff1916838001178555620002b1565b82800160010185558215620002b1579182015b82811115620002b157825182559160200191906001019062000294565b50620002bf929150620002c3565b5090565b5b80821115620002bf5760008155600101620002c4565b600181811c90821680620002ef57607f821691505b602082108114156200031157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161397a6200034b600039600081816118b801526125970152600081816115ff0152612568015261397a6000f3fe6080604052600436106102885760003560e01c80635c975abb1161015a57806394985ddd116100c1578063cb2432a71161007a578063cb2432a71461076b578063cf8f3cff1461078b578063e985e9c5146107a1578063edac985b146107ea578063f2fde38b1461080a578063f55f62df1461082a57600080fd5b806394985ddd146106ce57806395d89b41146106ee578063a22cb46514610703578063b46a997714610723578063b88d4fde1461072b578063c87b56dd1461074b57600080fd5b8063715018a611610113578063715018a614610642578063773a82c0146106575780637e15144b1461066c5780637fb724af146106815780638456cb59146106965780638da5cb5b146106ab57600080fd5b80635c975abb14610587578063627804af1461059f57806362f43a82146105bf5780636352211e146105d55780636bc20157146105f557806370a082311461062257600080fd5b80632f745c59116101fe57806342842e0e116101b757806342842e0e146104a257806349df728c146104c25780634f6ccce7146104e25780635344723a14610502578063557125691461052257806355b31b551461053957600080fd5b80632f745c591461040257806336a7808214610422578063380d831b1461044257806339f7e37f146104575780633ccfd60b1461047757806342619f661461048c57600080fd5b806311c0b0a61161025057806311c0b0a61461035e57806318160ddd1461038257806323b872dd1461039757806325dee0c4146103b757806327cb1d64146103d75780632a8e7a30146103ec57600080fd5b806301ffc9a71461028d57806306fdde03146102c2578063081812fc146102e4578063095ea7b31461031c5780630a8d05091461033e575b600080fd5b34801561029957600080fd5b506102ad6102a83660046131c0565b61083d565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102d761084e565b6040516102b99190613235565b3480156102f057600080fd5b506103046102ff366004613248565b6108e0565b6040516001600160a01b0390911681526020016102b9565b34801561032857600080fd5b5061033c610337366004613276565b61097a565b005b34801561034a57600080fd5b5061033c610359366004613341565b610a90565b34801561036a57600080fd5b50610374601a5481565b6040519081526020016102b9565b34801561038e57600080fd5b50600854610374565b3480156103a357600080fd5b5061033c6103b236600461338a565b610b39565b3480156103c357600080fd5b5061033c6103d2366004613248565b610b6a565b3480156103e357600080fd5b5061033c610b9f565b3480156103f857600080fd5b5061037460155481565b34801561040e57600080fd5b5061037461041d366004613276565b610d0f565b34801561042e57600080fd5b5061033c61043d366004613248565b610da5565b34801561044e57600080fd5b5061033c610dda565b34801561046357600080fd5b5061033c610472366004613341565b610f1c565b34801561048357600080fd5b5061033c610f86565b34801561049857600080fd5b5061037460185481565b3480156104ae57600080fd5b5061033c6104bd36600461338a565b611052565b3480156104ce57600080fd5b5061033c6104dd3660046133cb565b61106d565b3480156104ee57600080fd5b506103746104fd366004613248565b6111ad565b34801561050e57600080fd5b5061033c61051d366004613248565b611240565b34801561052e57600080fd5b5060185415156102ad565b34801561054557600080fd5b5061054e611275565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e0016102b9565b34801561059357600080fd5b50600b5460ff166102ad565b3480156105ab57600080fd5b5061033c6105ba366004613276565b6112b8565b3480156105cb57600080fd5b5061037460195481565b3480156105e157600080fd5b506103046105f0366004613248565b611436565b34801561060157600080fd5b506103746106103660046133cb565b601c6020526000908152604090205481565b34801561062e57600080fd5b5061037461063d3660046133cb565b6114ad565b34801561064e57600080fd5b5061033c611534565b34801561066357600080fd5b506103746115b4565b34801561067857600080fd5b5061033c611745565b34801561068d57600080fd5b5061033c611789565b3480156106a257600080fd5b5061033c611850565b3480156106b757600080fd5b50600b5461010090046001600160a01b0316610304565b3480156106da57600080fd5b5061033c6106e93660046133e8565b6118ad565b3480156106fa57600080fd5b506102d761192b565b34801561070f57600080fd5b5061033c61071e366004613418565b61193a565b61033c6119ff565b34801561073757600080fd5b5061033c610746366004613451565b611a3e565b34801561075757600080fd5b506102d7610766366004613248565b611a76565b34801561077757600080fd5b5061033c610786366004613248565b611a81565b34801561079757600080fd5b5061037460145481565b3480156107ad57600080fd5b506102ad6107bc3660046134d1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156107f657600080fd5b5061033c6108053660046134ff565b611ab6565b34801561081657600080fd5b5061033c6108253660046133cb565b611b49565b61033c610838366004613248565b611c45565b600061084882611f50565b92915050565b60606000805461085d906135b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610889906135b1565b80156108d65780601f106108ab576101008083540402835291602001916108d6565b820191906000526020600020905b8154815290600101906020018083116108b957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661095e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061098582611436565b9050806001600160a01b0316836001600160a01b031614156109f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610955565b336001600160a01b0382161480610a0f5750610a0f81336107bc565b610a815760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610955565b610a8b8383611f75565b505050565b600b546001600160a01b03610100909104163314610ac05760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610ae35760405162461bcd60e51b815260040161095590613621565b8051610af6906012906020840190613111565b50600b5460ff1615610b3657610b0a611fe3565b60405133907f18cf0e1dac2db2ed720cf9c5f3e00ed92af694f6e105b89958a19448e415bfca90600090a25b50565b610b433382612076565b610b5f5760405162461bcd60e51b815260040161095590613668565b610a8b83838361216d565b600b546001600160a01b03610100909104163314610b9a5760405162461bcd60e51b8152600401610955906135ec565b601755565b600b546001600160a01b03610100909104163314610bcf5760405162461bcd60e51b8152600401610955906135ec565b6002600c541415610bf25760405162461bcd60e51b8152600401610955906136b9565b6002600c55601854610c3e5760405162461bcd60e51b815260206004820152601560248201527414d95d081c985b991bdb481cd9595908199a5c9cdd605a1b6044820152606401610955565b6015544211610c8f5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206561726c7920666f722074686973206c6f74746f20647261770000006044820152606401610955565b601954471015610ce15760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682065746820746f20706179206a61636b706f740000006044820152606401610955565b426014819055610cf4906224ea00612318565b601555601954610d039061232b565b60006018556001600c55565b6000610d1a836114ad565b8210610d7c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610955565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600b546001600160a01b03610100909104163314610dd55760405162461bcd60e51b8152600401610955906135ec565b601655565b600b546001600160a01b03610100909104163314610e0a5760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610e2d5760405162461bcd60e51b815260040161095590613621565b600b5460ff1615610e805760405162461bcd60e51b815260206004820152601f60248201527f63616e6e6f7420636c6f73652073616c65207768696c737420706175736564006044820152606401610955565b60085460115414610ee25760405162461bcd60e51b815260206004820152602660248201527f63616e6e6f7420636c6f73652073616c65206265666f7265206974277320736f6044820152651b19081bdd5d60d21b6064820152608401610955565b6013805460ff1916600117905560405133907f017c3c67596bf3765531204f6eae2365a257d386c769dbbe71a191da149e861090600090a2565b600b546001600160a01b03610100909104163314610f4c5760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610f6f5760405162461bcd60e51b815260040161095590613621565b8051610f82906012906020840190613111565b5050565b600b546001600160a01b03610100909104163314610fb65760405162461bcd60e51b8152600401610955906135ec565b601a544790600090610fc990839061253e565b116110165760405162461bcd60e51b815260206004820152601f60248201527f224e6f2066756e647320617661696c61626c6520746f207769746864726177006044820152606401610955565b601a5433906108fc9061102a90849061253e565b6040518115909202916000818181858888f19350505050158015610f82573d6000803e3d6000fd5b610a8b83838360405180602001604052806000815250611a3e565b600b546001600160a01b0361010090910416331461109d5760405162461bcd60e51b8152600401610955906135ec565b6001600160a01b0381166110b057600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112a91906136f0565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561117557600080fd5b505af1158015611189573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190613709565b60006111b860085490565b821061121b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610955565b6008828154811061122e5761122e613726565b90600052602060002001549050919050565b600b546001600160a01b036101009091041633146112705760405162461bcd60e51b8152600401610955906135ec565b601955565b601954601a54601554600092839290918380611293600b5460ff1690565b905061129e60085490565b600f54601d5460ff16999098509596509394929392909150565b600b546001600160a01b036101009091041633146112e85760405162461bcd60e51b8152600401610955906135ec565b60135460ff161561130b5760405162461bcd60e51b815260040161095590613621565b6002600c54141561132e5760405162461bcd60e51b8152600401610955906136b9565b6002600c55601154600e5411156113745760405162461bcd60e51b815260206004820152600a602482015269536f6c64206f7574212160b01b6044820152606401610955565b600b5460ff166113d85760405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920646576206d696e74207768656e20636f6e7472616374206044820152681a5cc81c185d5cd95960ba1b6064820152608401610955565b6113e0611fe3565b60005b6113f5836113f0600e5490565b61254a565b611403600e80546001019055565b8061140d81613752565b9150508181108015611420575060105481105b6113e35761142c611850565b50506001600c5550565b6000818152600260205260408120546001600160a01b0316806108485760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610955565b60006001600160a01b0382166115185760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610955565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b036101009091041633146115645760405162461bcd60e51b8152600401610955906135ec565b600b5460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600b8054610100600160a81b0319169055565b600b546000906001600160a01b036101009091041633146115e75760405162461bcd60e51b8152600401610955906135ec565b6017546040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561164957600080fd5b505afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168191906136f0565b10156116cf5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e7472616374006044820152606401610955565b601854156117325760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420736574206c6f74746f207365656420696620697420697320616044820152691b1c9958591e481cd95d60b21b6064820152608401610955565b611740601654601754612564565b905090565b600b546001600160a01b036101009091041633146117755760405162461bcd60e51b8152600401610955906135ec565b601d805460ff19811660ff90911615179055565b600b546001600160a01b036101009091041633146117b95760405162461bcd60e51b8152600401610955906135ec565b6018546117fc5760405162461bcd60e51b815260206004820152601160248201527007365656420697320616c7265616479203607c1b6044820152606401610955565b6101f4611808600e5490565b106118495760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081c995cd95d081cd95959607a1b6044820152606401610955565b6000601855565b600b546001600160a01b036101009091041633146118805760405162461bcd60e51b8152600401610955906135ec565b60135460ff16156118a35760405162461bcd60e51b815260040161095590613621565b6118ab6126ef565b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146119255760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610955565b60185550565b60606001805461085d906135b1565b6001600160a01b0382163314156119935760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610955565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600c541415611a225760405162461bcd60e51b8152600401610955906136b9565b6002600c55601a54611a349034612318565b601a556001600c55565b611a483383612076565b611a645760405162461bcd60e51b815260040161095590613668565b611a7084848484612747565b50505050565b60606108488261277a565b600b546001600160a01b03610100909104163314611ab15760405162461bcd60e51b8152600401610955906135ec565b600f55565b600b546001600160a01b03610100909104163314611ae65760405162461bcd60e51b8152600401610955906135ec565b60005b8151811015610f82576002601c6000848481518110611b0a57611b0a613726565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080611b4190613752565b915050611ae9565b600b546001600160a01b03610100909104163314611b795760405162461bcd60e51b8152600401610955906135ec565b6001600160a01b038116611bde5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610955565b600b546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6002600c541415611c685760405162461bcd60e51b8152600401610955906136b9565b6002600c55600b5460ff1615611c905760405162461bcd60e51b81526004016109559061376d565b600081118015611ca257506010548111155b611ce45760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b6044820152606401610955565b601154600e541115611d255760405162461bcd60e51b815260206004820152600a602482015269536f6c64206f7574212160b01b6044820152606401610955565b600f54611d339082906128ec565b3414611d785760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b6044820152606401610955565b601d5460ff161580611d995750336000908152601c60205260409020548111155b611da257600080fd5b60c8611db7611db0336114ad565b8390612318565b111580611dd45750600b546001600160a01b036101009091041633145b611e335760405162461bcd60e51b815260206004820152602a60248201527f6d61782077616c6c6574206c696d69746572207475726e6564206f6e20666f726044820152692074657374696e67212160b01b6064820152608401610955565b60005b80611e4081613752565b915050611e50336113f0600e5490565b611e5e600e80546001019055565b8181108015611e715750601154600e5411155b611e36576000611ea26024611e9c6064611e9686600f546128ec90919063ffffffff16565b906128f8565b906128ec565b601a54909150611eb29082612318565b601a556000611ec1848461253e565b1115611f0857600f5433906108fc90611ede90611e9c878761253e565b6040518115909202916000818181858888f19350505050158015611f06573d6000803e3d6000fd5b505b601d5460ff161561142c57336000908152601c6020526040902054611f2d908461253e565b336000908152601c602052604090205550506001600c5550565b80546001019055565b60006001600160e01b0319821663780e9d6360e01b1480610848575061084882612904565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611faa82611436565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600b5460ff1661202c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610955565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000818152600260205260408120546001600160a01b03166120ef5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610955565b60006120fa83611436565b9050806001600160a01b0316846001600160a01b031614806121355750836001600160a01b031661212a846108e0565b6001600160a01b0316145b8061216557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661218082611436565b6001600160a01b0316146121e85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610955565b6001600160a01b03821661224a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610955565b612255838383612954565b612260600082611f75565b6001600160a01b0383166000908152600360205260408120805460019290612289908490613797565b90915550506001600160a01b03821660009081526003602052604081208054600192906122b79084906137ae565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061232482846137ae565b9392505050565b601a54612338908261253e565b601a5560006123488260646128f8565b9050600060405180610140016040528061236c6028856128ec90919063ffffffff16565b815260200161237c84600a6128ec565b815260200161238c84600a6128ec565b815260200161239c84600a6128ec565b81526020016123ac84600a6128ec565b81526020016123bc8460046128ec565b81526020016123cc8460046128ec565b81526020016123dc8460046128ec565b81526020016123ec8460046128ec565b81526020016123fc8460046128ec565b90529050600061240b60085490565b9050600061241a600a83612982565b905060005b600a81101561253657600082828151811061243c5761243c613726565b602002602001015190506000811180156124565750838111155b1561252357600061246682611436565b9050806001600160a01b03166108fc8785600a811061248757612487613726565b60200201516040518115909202916000818181858888f193505050501580156124b4573d6000803e3d6000fd5b50806001600160a01b03167f0e843bc58afd1757e4996c8beca5580f7d0f32894abac8c50e811640506ad1928785600a81106124f2576124f2613726565b60200201518585604051612519939291909283526020830191909152604082015260600190565b60405180910390a2505b508061252e81613752565b91505061241f565b505050505050565b60006123248284613797565b610f82828260405180602001604052806000815250612a57565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f0000000000000000000000000000000000000000000000000000000000000000848660006040516020016125d4929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401612601939291906137c6565b602060405180830381600087803b15801561261b57600080fd5b505af115801561262f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126539190613709565b506000838152600d6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526126af9060016137ae565b6000858152600d60205260409020556121658482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600b5460ff16156127125760405162461bcd60e51b81526004016109559061376d565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120593390565b61275284848461216d565b61275e84848484612a8a565b611a705760405162461bcd60e51b8152600401610955906137f6565b6000818152600260205260409020546060906001600160a01b03166127fb5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610955565b6000828152600a602052604081208054612814906135b1565b80601f0160208091040260200160405190810160405280929190818152602001828054612840906135b1565b801561288d5780601f106128625761010080835404028352916020019161288d565b820191906000526020600020905b81548152906001019060200180831161287057829003601f168201915b50505050509050600061289e612b94565b90508051600014156128b1575092915050565b8151156128e35780826040516020016128cb929190613848565b60405160208183030381529060405292505050919050565b61216584612ba3565b60006123248284613877565b600061232482846138ac565b60006001600160e01b031982166380ac58cd60e01b148061293557506001600160e01b03198216635b5e139f60e01b145b8061084857506301ffc9a760e01b6001600160e01b0319831614610848565b600b5460ff16156129775760405162461bcd60e51b81526004016109559061376d565b610a8b838383612c7d565b60608267ffffffffffffffff81111561299d5761299d6132a2565b6040519080825280602002602001820160405280156129c6578160200160208202803683370190505b50905060005b83811015612a5057612a21600184601854846040516020016129f8929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c612a1b91906138c0565b90612318565b828281518110612a3357612a33613726565b602090810291909101015280612a4881613752565b9150506129cc565b5092915050565b612a618383612d35565b612a6e6000848484612a8a565b610a8b5760405162461bcd60e51b8152600401610955906137f6565b60006001600160a01b0384163b15612b8c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ace9033908990889088906004016138d4565b602060405180830381600087803b158015612ae857600080fd5b505af1925050508015612b18575060408051601f3d908101601f19168201909252612b1591810190613911565b60015b612b72573d808015612b46576040519150601f19603f3d011682016040523d82523d6000602084013e612b4b565b606091505b508051612b6a5760405162461bcd60e51b8152600401610955906137f6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612165565b506001612165565b60606012805461085d906135b1565b6000818152600260205260409020546060906001600160a01b0316612c225760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610955565b6000612c2c612b94565b90506000815111612c4c5760405180602001604052806000815250612324565b80612c5684612e83565b604051602001612c67929190613848565b6040516020818303038152906040529392505050565b6001600160a01b038316612cd857612cd381600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612cfb565b816001600160a01b0316836001600160a01b031614612cfb57612cfb8382612f81565b6001600160a01b038216612d1257610a8b8161301e565b826001600160a01b0316826001600160a01b031614610a8b57610a8b82826130cd565b6001600160a01b038216612d8b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610955565b6000818152600260205260409020546001600160a01b031615612df05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610955565b612dfc60008383612954565b6001600160a01b0382166000908152600360205260408120805460019290612e259084906137ae565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606081612ea75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ed15780612ebb81613752565b9150612eca9050600a836138ac565b9150612eab565b60008167ffffffffffffffff811115612eec57612eec6132a2565b6040519080825280601f01601f191660200182016040528015612f16576020820181803683370190505b5090505b841561216557612f2b600183613797565b9150612f38600a866138c0565b612f439060306137ae565b60f81b818381518110612f5857612f58613726565b60200101906001600160f81b031916908160001a905350612f7a600a866138ac565b9450612f1a565b60006001612f8e846114ad565b612f989190613797565b600083815260076020526040902054909150808214612feb576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061303090600190613797565b6000838152600960205260408120546008805493945090928490811061305857613058613726565b90600052602060002001549050806008838154811061307957613079613726565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130b1576130b161392e565b6001900381819060005260206000200160009055905550505050565b60006130d8836114ad565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461311d906135b1565b90600052602060002090601f01602090048101928261313f5760008555613185565b82601f1061315857805160ff1916838001178555613185565b82800160010185558215613185579182015b8281111561318557825182559160200191906001019061316a565b50613191929150613195565b5090565b5b808211156131915760008155600101613196565b6001600160e01b031981168114610b3657600080fd5b6000602082840312156131d257600080fd5b8135612324816131aa565b60005b838110156131f85781810151838201526020016131e0565b83811115611a705750506000910152565b600081518084526132218160208601602086016131dd565b601f01601f19169290920160200192915050565b6020815260006123246020830184613209565b60006020828403121561325a57600080fd5b5035919050565b6001600160a01b0381168114610b3657600080fd5b6000806040838503121561328957600080fd5b823561329481613261565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132e1576132e16132a2565b604052919050565b600067ffffffffffffffff831115613303576133036132a2565b613316601f8401601f19166020016132b8565b905082815283838301111561332a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561335357600080fd5b813567ffffffffffffffff81111561336a57600080fd5b8201601f8101841361337b57600080fd5b612165848235602084016132e9565b60008060006060848603121561339f57600080fd5b83356133aa81613261565b925060208401356133ba81613261565b929592945050506040919091013590565b6000602082840312156133dd57600080fd5b813561232481613261565b600080604083850312156133fb57600080fd5b50508035926020909101359150565b8015158114610b3657600080fd5b6000806040838503121561342b57600080fd5b823561343681613261565b915060208301356134468161340a565b809150509250929050565b6000806000806080858703121561346757600080fd5b843561347281613261565b9350602085013561348281613261565b925060408501359150606085013567ffffffffffffffff8111156134a557600080fd5b8501601f810187136134b657600080fd5b6134c5878235602084016132e9565b91505092959194509250565b600080604083850312156134e457600080fd5b82356134ef81613261565b9150602083013561344681613261565b6000602080838503121561351257600080fd5b823567ffffffffffffffff8082111561352a57600080fd5b818501915085601f83011261353e57600080fd5b813581811115613550576135506132a2565b8060051b91506135618483016132b8565b818152918301840191848101908884111561357b57600080fd5b938501935b838510156135a5578435925061359583613261565b8282529385019390850190613580565b98975050505050505050565b600181811c908216806135c557607f821691505b602082108114156135e657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f53616c6520636c6f7365642e20416374696f6e2063616e6e6f7420626520636f6040820152661b5c1b195d195960ca1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561370257600080fd5b5051919050565b60006020828403121561371b57600080fd5b81516123248161340a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156137665761376661373c565b5060010190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6000828210156137a9576137a961373c565b500390565b600082198211156137c1576137c161373c565b500190565b60018060a01b03841681528260208201526060604082015260006137ed6060830184613209565b95945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161385a8184602088016131dd565b83519083019061386e8183602088016131dd565b01949350505050565b60008160001904831182151516156138915761389161373c565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826138bb576138bb613896565b500490565b6000826138cf576138cf613896565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061390790830184613209565b9695505050505050565b60006020828403121561392357600080fd5b8151612324816131aa565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220af368a858e39fda8df9f67edab29e63092fdb3f4987d37787207df9494014c4b64736f6c63430008090033
Deployed Bytecode
0x6080604052600436106102885760003560e01c80635c975abb1161015a57806394985ddd116100c1578063cb2432a71161007a578063cb2432a71461076b578063cf8f3cff1461078b578063e985e9c5146107a1578063edac985b146107ea578063f2fde38b1461080a578063f55f62df1461082a57600080fd5b806394985ddd146106ce57806395d89b41146106ee578063a22cb46514610703578063b46a997714610723578063b88d4fde1461072b578063c87b56dd1461074b57600080fd5b8063715018a611610113578063715018a614610642578063773a82c0146106575780637e15144b1461066c5780637fb724af146106815780638456cb59146106965780638da5cb5b146106ab57600080fd5b80635c975abb14610587578063627804af1461059f57806362f43a82146105bf5780636352211e146105d55780636bc20157146105f557806370a082311461062257600080fd5b80632f745c59116101fe57806342842e0e116101b757806342842e0e146104a257806349df728c146104c25780634f6ccce7146104e25780635344723a14610502578063557125691461052257806355b31b551461053957600080fd5b80632f745c591461040257806336a7808214610422578063380d831b1461044257806339f7e37f146104575780633ccfd60b1461047757806342619f661461048c57600080fd5b806311c0b0a61161025057806311c0b0a61461035e57806318160ddd1461038257806323b872dd1461039757806325dee0c4146103b757806327cb1d64146103d75780632a8e7a30146103ec57600080fd5b806301ffc9a71461028d57806306fdde03146102c2578063081812fc146102e4578063095ea7b31461031c5780630a8d05091461033e575b600080fd5b34801561029957600080fd5b506102ad6102a83660046131c0565b61083d565b60405190151581526020015b60405180910390f35b3480156102ce57600080fd5b506102d761084e565b6040516102b99190613235565b3480156102f057600080fd5b506103046102ff366004613248565b6108e0565b6040516001600160a01b0390911681526020016102b9565b34801561032857600080fd5b5061033c610337366004613276565b61097a565b005b34801561034a57600080fd5b5061033c610359366004613341565b610a90565b34801561036a57600080fd5b50610374601a5481565b6040519081526020016102b9565b34801561038e57600080fd5b50600854610374565b3480156103a357600080fd5b5061033c6103b236600461338a565b610b39565b3480156103c357600080fd5b5061033c6103d2366004613248565b610b6a565b3480156103e357600080fd5b5061033c610b9f565b3480156103f857600080fd5b5061037460155481565b34801561040e57600080fd5b5061037461041d366004613276565b610d0f565b34801561042e57600080fd5b5061033c61043d366004613248565b610da5565b34801561044e57600080fd5b5061033c610dda565b34801561046357600080fd5b5061033c610472366004613341565b610f1c565b34801561048357600080fd5b5061033c610f86565b34801561049857600080fd5b5061037460185481565b3480156104ae57600080fd5b5061033c6104bd36600461338a565b611052565b3480156104ce57600080fd5b5061033c6104dd3660046133cb565b61106d565b3480156104ee57600080fd5b506103746104fd366004613248565b6111ad565b34801561050e57600080fd5b5061033c61051d366004613248565b611240565b34801561052e57600080fd5b5060185415156102ad565b34801561054557600080fd5b5061054e611275565b6040805197151588526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e0016102b9565b34801561059357600080fd5b50600b5460ff166102ad565b3480156105ab57600080fd5b5061033c6105ba366004613276565b6112b8565b3480156105cb57600080fd5b5061037460195481565b3480156105e157600080fd5b506103046105f0366004613248565b611436565b34801561060157600080fd5b506103746106103660046133cb565b601c6020526000908152604090205481565b34801561062e57600080fd5b5061037461063d3660046133cb565b6114ad565b34801561064e57600080fd5b5061033c611534565b34801561066357600080fd5b506103746115b4565b34801561067857600080fd5b5061033c611745565b34801561068d57600080fd5b5061033c611789565b3480156106a257600080fd5b5061033c611850565b3480156106b757600080fd5b50600b5461010090046001600160a01b0316610304565b3480156106da57600080fd5b5061033c6106e93660046133e8565b6118ad565b3480156106fa57600080fd5b506102d761192b565b34801561070f57600080fd5b5061033c61071e366004613418565b61193a565b61033c6119ff565b34801561073757600080fd5b5061033c610746366004613451565b611a3e565b34801561075757600080fd5b506102d7610766366004613248565b611a76565b34801561077757600080fd5b5061033c610786366004613248565b611a81565b34801561079757600080fd5b5061037460145481565b3480156107ad57600080fd5b506102ad6107bc3660046134d1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156107f657600080fd5b5061033c6108053660046134ff565b611ab6565b34801561081657600080fd5b5061033c6108253660046133cb565b611b49565b61033c610838366004613248565b611c45565b600061084882611f50565b92915050565b60606000805461085d906135b1565b80601f0160208091040260200160405190810160405280929190818152602001828054610889906135b1565b80156108d65780601f106108ab576101008083540402835291602001916108d6565b820191906000526020600020905b8154815290600101906020018083116108b957829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661095e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061098582611436565b9050806001600160a01b0316836001600160a01b031614156109f35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610955565b336001600160a01b0382161480610a0f5750610a0f81336107bc565b610a815760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610955565b610a8b8383611f75565b505050565b600b546001600160a01b03610100909104163314610ac05760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610ae35760405162461bcd60e51b815260040161095590613621565b8051610af6906012906020840190613111565b50600b5460ff1615610b3657610b0a611fe3565b60405133907f18cf0e1dac2db2ed720cf9c5f3e00ed92af694f6e105b89958a19448e415bfca90600090a25b50565b610b433382612076565b610b5f5760405162461bcd60e51b815260040161095590613668565b610a8b83838361216d565b600b546001600160a01b03610100909104163314610b9a5760405162461bcd60e51b8152600401610955906135ec565b601755565b600b546001600160a01b03610100909104163314610bcf5760405162461bcd60e51b8152600401610955906135ec565b6002600c541415610bf25760405162461bcd60e51b8152600401610955906136b9565b6002600c55601854610c3e5760405162461bcd60e51b815260206004820152601560248201527414d95d081c985b991bdb481cd9595908199a5c9cdd605a1b6044820152606401610955565b6015544211610c8f5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206561726c7920666f722074686973206c6f74746f20647261770000006044820152606401610955565b601954471015610ce15760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682065746820746f20706179206a61636b706f740000006044820152606401610955565b426014819055610cf4906224ea00612318565b601555601954610d039061232b565b60006018556001600c55565b6000610d1a836114ad565b8210610d7c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610955565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600b546001600160a01b03610100909104163314610dd55760405162461bcd60e51b8152600401610955906135ec565b601655565b600b546001600160a01b03610100909104163314610e0a5760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610e2d5760405162461bcd60e51b815260040161095590613621565b600b5460ff1615610e805760405162461bcd60e51b815260206004820152601f60248201527f63616e6e6f7420636c6f73652073616c65207768696c737420706175736564006044820152606401610955565b60085460115414610ee25760405162461bcd60e51b815260206004820152602660248201527f63616e6e6f7420636c6f73652073616c65206265666f7265206974277320736f6044820152651b19081bdd5d60d21b6064820152608401610955565b6013805460ff1916600117905560405133907f017c3c67596bf3765531204f6eae2365a257d386c769dbbe71a191da149e861090600090a2565b600b546001600160a01b03610100909104163314610f4c5760405162461bcd60e51b8152600401610955906135ec565b60135460ff1615610f6f5760405162461bcd60e51b815260040161095590613621565b8051610f82906012906020840190613111565b5050565b600b546001600160a01b03610100909104163314610fb65760405162461bcd60e51b8152600401610955906135ec565b601a544790600090610fc990839061253e565b116110165760405162461bcd60e51b815260206004820152601f60248201527f224e6f2066756e647320617661696c61626c6520746f207769746864726177006044820152606401610955565b601a5433906108fc9061102a90849061253e565b6040518115909202916000818181858888f19350505050158015610f82573d6000803e3d6000fd5b610a8b83838360405180602001604052806000815250611a3e565b600b546001600160a01b0361010090910416331461109d5760405162461bcd60e51b8152600401610955906135ec565b6001600160a01b0381166110b057600080fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156110f257600080fd5b505afa158015611106573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112a91906136f0565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561117557600080fd5b505af1158015611189573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190613709565b60006111b860085490565b821061121b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610955565b6008828154811061122e5761122e613726565b90600052602060002001549050919050565b600b546001600160a01b036101009091041633146112705760405162461bcd60e51b8152600401610955906135ec565b601955565b601954601a54601554600092839290918380611293600b5460ff1690565b905061129e60085490565b600f54601d5460ff16999098509596509394929392909150565b600b546001600160a01b036101009091041633146112e85760405162461bcd60e51b8152600401610955906135ec565b60135460ff161561130b5760405162461bcd60e51b815260040161095590613621565b6002600c54141561132e5760405162461bcd60e51b8152600401610955906136b9565b6002600c55601154600e5411156113745760405162461bcd60e51b815260206004820152600a602482015269536f6c64206f7574212160b01b6044820152606401610955565b600b5460ff166113d85760405162461bcd60e51b815260206004820152602960248201527f43616e206f6e6c7920646576206d696e74207768656e20636f6e7472616374206044820152681a5cc81c185d5cd95960ba1b6064820152608401610955565b6113e0611fe3565b60005b6113f5836113f0600e5490565b61254a565b611403600e80546001019055565b8061140d81613752565b9150508181108015611420575060105481105b6113e35761142c611850565b50506001600c5550565b6000818152600260205260408120546001600160a01b0316806108485760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610955565b60006001600160a01b0382166115185760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610955565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b036101009091041633146115645760405162461bcd60e51b8152600401610955906135ec565b600b5460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600b8054610100600160a81b0319169055565b600b546000906001600160a01b036101009091041633146115e75760405162461bcd60e51b8152600401610955906135ec565b6017546040516370a0823160e01b81523060048201527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906370a082319060240160206040518083038186803b15801561164957600080fd5b505afa15801561165d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168191906136f0565b10156116cf5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f756768204c494e4b202d2066696c6c20636f6e7472616374006044820152606401610955565b601854156117325760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420736574206c6f74746f207365656420696620697420697320616044820152691b1c9958591e481cd95d60b21b6064820152608401610955565b611740601654601754612564565b905090565b600b546001600160a01b036101009091041633146117755760405162461bcd60e51b8152600401610955906135ec565b601d805460ff19811660ff90911615179055565b600b546001600160a01b036101009091041633146117b95760405162461bcd60e51b8152600401610955906135ec565b6018546117fc5760405162461bcd60e51b815260206004820152601160248201527007365656420697320616c7265616479203607c1b6044820152606401610955565b6101f4611808600e5490565b106118495760405162461bcd60e51b815260206004820152601160248201527010d85b9b9bdd081c995cd95d081cd95959607a1b6044820152606401610955565b6000601855565b600b546001600160a01b036101009091041633146118805760405162461bcd60e51b8152600401610955906135ec565b60135460ff16156118a35760405162461bcd60e51b815260040161095590613621565b6118ab6126ef565b565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146119255760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610955565b60185550565b60606001805461085d906135b1565b6001600160a01b0382163314156119935760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610955565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600c541415611a225760405162461bcd60e51b8152600401610955906136b9565b6002600c55601a54611a349034612318565b601a556001600c55565b611a483383612076565b611a645760405162461bcd60e51b815260040161095590613668565b611a7084848484612747565b50505050565b60606108488261277a565b600b546001600160a01b03610100909104163314611ab15760405162461bcd60e51b8152600401610955906135ec565b600f55565b600b546001600160a01b03610100909104163314611ae65760405162461bcd60e51b8152600401610955906135ec565b60005b8151811015610f82576002601c6000848481518110611b0a57611b0a613726565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080611b4190613752565b915050611ae9565b600b546001600160a01b03610100909104163314611b795760405162461bcd60e51b8152600401610955906135ec565b6001600160a01b038116611bde5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610955565b600b546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6002600c541415611c685760405162461bcd60e51b8152600401610955906136b9565b6002600c55600b5460ff1615611c905760405162461bcd60e51b81526004016109559061376d565b600081118015611ca257506010548111155b611ce45760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081b5a5b9d08185b5bdd5b9d606a1b6044820152606401610955565b601154600e541115611d255760405162461bcd60e51b815260206004820152600a602482015269536f6c64206f7574212160b01b6044820152606401610955565b600f54611d339082906128ec565b3414611d785760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0811551208185b5bdd5b9d60621b6044820152606401610955565b601d5460ff161580611d995750336000908152601c60205260409020548111155b611da257600080fd5b60c8611db7611db0336114ad565b8390612318565b111580611dd45750600b546001600160a01b036101009091041633145b611e335760405162461bcd60e51b815260206004820152602a60248201527f6d61782077616c6c6574206c696d69746572207475726e6564206f6e20666f726044820152692074657374696e67212160b01b6064820152608401610955565b60005b80611e4081613752565b915050611e50336113f0600e5490565b611e5e600e80546001019055565b8181108015611e715750601154600e5411155b611e36576000611ea26024611e9c6064611e9686600f546128ec90919063ffffffff16565b906128f8565b906128ec565b601a54909150611eb29082612318565b601a556000611ec1848461253e565b1115611f0857600f5433906108fc90611ede90611e9c878761253e565b6040518115909202916000818181858888f19350505050158015611f06573d6000803e3d6000fd5b505b601d5460ff161561142c57336000908152601c6020526040902054611f2d908461253e565b336000908152601c602052604090205550506001600c5550565b80546001019055565b60006001600160e01b0319821663780e9d6360e01b1480610848575061084882612904565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611faa82611436565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600b5460ff1661202c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610955565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000818152600260205260408120546001600160a01b03166120ef5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610955565b60006120fa83611436565b9050806001600160a01b0316846001600160a01b031614806121355750836001600160a01b031661212a846108e0565b6001600160a01b0316145b8061216557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661218082611436565b6001600160a01b0316146121e85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610955565b6001600160a01b03821661224a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610955565b612255838383612954565b612260600082611f75565b6001600160a01b0383166000908152600360205260408120805460019290612289908490613797565b90915550506001600160a01b03821660009081526003602052604081208054600192906122b79084906137ae565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061232482846137ae565b9392505050565b601a54612338908261253e565b601a5560006123488260646128f8565b9050600060405180610140016040528061236c6028856128ec90919063ffffffff16565b815260200161237c84600a6128ec565b815260200161238c84600a6128ec565b815260200161239c84600a6128ec565b81526020016123ac84600a6128ec565b81526020016123bc8460046128ec565b81526020016123cc8460046128ec565b81526020016123dc8460046128ec565b81526020016123ec8460046128ec565b81526020016123fc8460046128ec565b90529050600061240b60085490565b9050600061241a600a83612982565b905060005b600a81101561253657600082828151811061243c5761243c613726565b602002602001015190506000811180156124565750838111155b1561252357600061246682611436565b9050806001600160a01b03166108fc8785600a811061248757612487613726565b60200201516040518115909202916000818181858888f193505050501580156124b4573d6000803e3d6000fd5b50806001600160a01b03167f0e843bc58afd1757e4996c8beca5580f7d0f32894abac8c50e811640506ad1928785600a81106124f2576124f2613726565b60200201518585604051612519939291909283526020830191909152604082015260600190565b60405180910390a2505b508061252e81613752565b91505061241f565b505050505050565b60006123248284613797565b610f82828260405180602001604052806000815250612a57565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952848660006040516020016125d4929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401612601939291906137c6565b602060405180830381600087803b15801561261b57600080fd5b505af115801561262f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126539190613709565b506000838152600d6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526126af9060016137ae565b6000858152600d60205260409020556121658482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b600b5460ff16156127125760405162461bcd60e51b81526004016109559061376d565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586120593390565b61275284848461216d565b61275e84848484612a8a565b611a705760405162461bcd60e51b8152600401610955906137f6565b6000818152600260205260409020546060906001600160a01b03166127fb5760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610955565b6000828152600a602052604081208054612814906135b1565b80601f0160208091040260200160405190810160405280929190818152602001828054612840906135b1565b801561288d5780601f106128625761010080835404028352916020019161288d565b820191906000526020600020905b81548152906001019060200180831161287057829003601f168201915b50505050509050600061289e612b94565b90508051600014156128b1575092915050565b8151156128e35780826040516020016128cb929190613848565b60405160208183030381529060405292505050919050565b61216584612ba3565b60006123248284613877565b600061232482846138ac565b60006001600160e01b031982166380ac58cd60e01b148061293557506001600160e01b03198216635b5e139f60e01b145b8061084857506301ffc9a760e01b6001600160e01b0319831614610848565b600b5460ff16156129775760405162461bcd60e51b81526004016109559061376d565b610a8b838383612c7d565b60608267ffffffffffffffff81111561299d5761299d6132a2565b6040519080825280602002602001820160405280156129c6578160200160208202803683370190505b50905060005b83811015612a5057612a21600184601854846040516020016129f8929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c612a1b91906138c0565b90612318565b828281518110612a3357612a33613726565b602090810291909101015280612a4881613752565b9150506129cc565b5092915050565b612a618383612d35565b612a6e6000848484612a8a565b610a8b5760405162461bcd60e51b8152600401610955906137f6565b60006001600160a01b0384163b15612b8c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ace9033908990889088906004016138d4565b602060405180830381600087803b158015612ae857600080fd5b505af1925050508015612b18575060408051601f3d908101601f19168201909252612b1591810190613911565b60015b612b72573d808015612b46576040519150601f19603f3d011682016040523d82523d6000602084013e612b4b565b606091505b508051612b6a5760405162461bcd60e51b8152600401610955906137f6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612165565b506001612165565b60606012805461085d906135b1565b6000818152600260205260409020546060906001600160a01b0316612c225760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610955565b6000612c2c612b94565b90506000815111612c4c5760405180602001604052806000815250612324565b80612c5684612e83565b604051602001612c67929190613848565b6040516020818303038152906040529392505050565b6001600160a01b038316612cd857612cd381600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612cfb565b816001600160a01b0316836001600160a01b031614612cfb57612cfb8382612f81565b6001600160a01b038216612d1257610a8b8161301e565b826001600160a01b0316826001600160a01b031614610a8b57610a8b82826130cd565b6001600160a01b038216612d8b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610955565b6000818152600260205260409020546001600160a01b031615612df05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610955565b612dfc60008383612954565b6001600160a01b0382166000908152600360205260408120805460019290612e259084906137ae565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606081612ea75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612ed15780612ebb81613752565b9150612eca9050600a836138ac565b9150612eab565b60008167ffffffffffffffff811115612eec57612eec6132a2565b6040519080825280601f01601f191660200182016040528015612f16576020820181803683370190505b5090505b841561216557612f2b600183613797565b9150612f38600a866138c0565b612f439060306137ae565b60f81b818381518110612f5857612f58613726565b60200101906001600160f81b031916908160001a905350612f7a600a866138ac565b9450612f1a565b60006001612f8e846114ad565b612f989190613797565b600083815260076020526040902054909150808214612feb576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061303090600190613797565b6000838152600960205260408120546008805493945090928490811061305857613058613726565b90600052602060002001549050806008838154811061307957613079613726565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806130b1576130b161392e565b6001900381819060005260206000200160009055905550505050565b60006130d8836114ad565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461311d906135b1565b90600052602060002090601f01602090048101928261313f5760008555613185565b82601f1061315857805160ff1916838001178555613185565b82800160010185558215613185579182015b8281111561318557825182559160200191906001019061316a565b50613191929150613195565b5090565b5b808211156131915760008155600101613196565b6001600160e01b031981168114610b3657600080fd5b6000602082840312156131d257600080fd5b8135612324816131aa565b60005b838110156131f85781810151838201526020016131e0565b83811115611a705750506000910152565b600081518084526132218160208601602086016131dd565b601f01601f19169290920160200192915050565b6020815260006123246020830184613209565b60006020828403121561325a57600080fd5b5035919050565b6001600160a01b0381168114610b3657600080fd5b6000806040838503121561328957600080fd5b823561329481613261565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132e1576132e16132a2565b604052919050565b600067ffffffffffffffff831115613303576133036132a2565b613316601f8401601f19166020016132b8565b905082815283838301111561332a57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561335357600080fd5b813567ffffffffffffffff81111561336a57600080fd5b8201601f8101841361337b57600080fd5b612165848235602084016132e9565b60008060006060848603121561339f57600080fd5b83356133aa81613261565b925060208401356133ba81613261565b929592945050506040919091013590565b6000602082840312156133dd57600080fd5b813561232481613261565b600080604083850312156133fb57600080fd5b50508035926020909101359150565b8015158114610b3657600080fd5b6000806040838503121561342b57600080fd5b823561343681613261565b915060208301356134468161340a565b809150509250929050565b6000806000806080858703121561346757600080fd5b843561347281613261565b9350602085013561348281613261565b925060408501359150606085013567ffffffffffffffff8111156134a557600080fd5b8501601f810187136134b657600080fd5b6134c5878235602084016132e9565b91505092959194509250565b600080604083850312156134e457600080fd5b82356134ef81613261565b9150602083013561344681613261565b6000602080838503121561351257600080fd5b823567ffffffffffffffff8082111561352a57600080fd5b818501915085601f83011261353e57600080fd5b813581811115613550576135506132a2565b8060051b91506135618483016132b8565b818152918301840191848101908884111561357b57600080fd5b938501935b838510156135a5578435925061359583613261565b8282529385019390850190613580565b98975050505050505050565b600181811c908216806135c557607f821691505b602082108114156135e657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f53616c6520636c6f7365642e20416374696f6e2063616e6e6f7420626520636f6040820152661b5c1b195d195960ca1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561370257600080fd5b5051919050565b60006020828403121561371b57600080fd5b81516123248161340a565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156137665761376661373c565b5060010190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6000828210156137a9576137a961373c565b500390565b600082198211156137c1576137c161373c565b500190565b60018060a01b03841681528260208201526060604082015260006137ed6060830184613209565b95945050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000835161385a8184602088016131dd565b83519083019061386e8183602088016131dd565b01949350505050565b60008160001904831182151516156138915761389161373c565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826138bb576138bb613896565b500490565b6000826138cf576138cf613896565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061390790830184613209565b9695505050505050565b60006020828403121561392357600080fd5b8151612324816131aa565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220af368a858e39fda8df9f67edab29e63092fdb3f4987d37787207df9494014c4b64736f6c63430008090033
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.