Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 5,227 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Safe Transfer Fr... | 20914628 | 7 days ago | IN | 0 ETH | 0.00465268 | ||||
Set Approval For... | 20778982 | 26 days ago | IN | 0 ETH | 0.00039855 | ||||
Set Approval For... | 20708287 | 36 days ago | IN | 0 ETH | 0.00006961 | ||||
Set Approval For... | 20698890 | 37 days ago | IN | 0 ETH | 0.00008896 | ||||
Set Approval For... | 20600645 | 51 days ago | IN | 0 ETH | 0.00004537 | ||||
Safe Transfer Fr... | 20573496 | 54 days ago | IN | 0 ETH | 0.00009849 | ||||
Safe Transfer Fr... | 20562976 | 56 days ago | IN | 0 ETH | 0.00023632 | ||||
Safe Transfer Fr... | 20562974 | 56 days ago | IN | 0 ETH | 0.00019203 | ||||
Safe Transfer Fr... | 20562972 | 56 days ago | IN | 0 ETH | 0.00027507 | ||||
Set Approval For... | 20453658 | 71 days ago | IN | 0 ETH | 0.00002552 | ||||
Set Approval For... | 20453658 | 71 days ago | IN | 0 ETH | 0.00004439 | ||||
Set Approval For... | 20450802 | 72 days ago | IN | 0 ETH | 0.00006745 | ||||
Set Approval For... | 20287022 | 94 days ago | IN | 0 ETH | 0.00011161 | ||||
Transfer From | 20200767 | 106 days ago | IN | 0 ETH | 0.00012993 | ||||
Transfer From | 20200766 | 106 days ago | IN | 0 ETH | 0.00014241 | ||||
Transfer From | 20200762 | 106 days ago | IN | 0 ETH | 0.00016945 | ||||
Transfer From | 20200725 | 106 days ago | IN | 0 ETH | 0.00020411 | ||||
Set Approval For... | 20106552 | 120 days ago | IN | 0 ETH | 0.0001486 | ||||
Transfer From | 20096417 | 121 days ago | IN | 0 ETH | 0.00043315 | ||||
Transfer From | 20096416 | 121 days ago | IN | 0 ETH | 0.00047692 | ||||
Transfer From | 20096414 | 121 days ago | IN | 0 ETH | 0.00048599 | ||||
Transfer From | 20096405 | 121 days ago | IN | 0 ETH | 0.00051569 | ||||
Transfer From | 20096395 | 121 days ago | IN | 0 ETH | 0.00054727 | ||||
Transfer From | 20096394 | 121 days ago | IN | 0 ETH | 0.00055328 | ||||
Transfer From | 20096389 | 121 days ago | IN | 0 ETH | 0.00065339 |
Loading...
Loading
Contract Name:
Main
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 2200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; // ,--------.,------.,------. ,------.,--. ,--. // '--. .--'| .---'| .-. \ | .-. \\ `.' / // | | | `--, | | \ :| | \ :'. / // | | | `---.| '--' /| '--' / | | // `--' `------'`-------' `-------' `--' // ,-----. ,------. ,---. ,------. // | |) /_| .---' / O \ | .--. ' // | .-. \ `--, | .-. || '--'.' // | '--' / `---.| | | || |\ \ // `------'`------'`--' `--'`--' '--' // ,---. ,-----. ,--. ,--. ,---. ,------. // ' .-' ' .-. ' | | | | / O \ | .-. \ // `. `-. | | | | | | | || .-. || | \ : // .-' |' '-' '-.' '-' '| | | || '--' / // `-----' `-----'--' `-----' `--' `--'`-------' // @nftchef import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721SeqEnumerable.sol"; import "./rewardToken.sol"; //---------------------------------------------------------------------------- // OpenSea proxy //---------------------------------------------------------------------------- import "./common/ContextMixin.sol"; import "./common/NativeMetaTransaction.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } // ERC20 $TOYS Token Interface interface IRewardToken { function spend(address _from, uint256 _amount) external; function getTotalClaimable(address _address) external; function updateReward( address _from, address _to, uint256 _qty ) external; } //---------------------------------------------------------------------------- // Teddy Bear Squad //---------------------------------------------------------------------------- contract Main is ERC721SeqEnumerable, ContextMixin, NativeMetaTransaction, Ownable, Pausable, ReentrancyGuard, VRFConsumerBase { using Strings for uint256; using ECDSA for bytes32; uint128 public PUBLIC_SUPPLY = 9851; uint128 public MAX_SUPPLY = 10001; uint128 public PUBLIC_MINT_LIMIT = 7; uint128 public PRESALE_MINT_LIMIT = 4; uint128 public PUBLIC_PRICE = 0.12 ether; uint128 public PRESALE_PRICE = 0.08 ether; // Start 2022/01/24 14:00:00 UTC uint256 public presaleStartTime = 1643032800; uint256 public publicStartInterval = 1 days; // @dev enforce a per-address lifetime limit based on the mintBalances mapping bool public publicWalletLimit = true; bool public isRevealed = false; string public PROVENANCE_HASH; // keccak256 mapping(address => uint256) public mintBalances; uint256 public tokenOffset; string internal baseTokenURI; address[] internal payees; address internal _SIGNER; IRewardToken public RewardToys; // opensea proxy address private immutable _proxyRegistryAddress; address private _treasury = 0x8fBc1fB5fd267aFefF5cc4e69b3ca6D41567dc01; // LINK uint256 internal LINK_FEE; bytes32 internal LINK_KEY_HASH; constructor( string memory _initialURI, bytes32 _keyHash, address _vrfCoordinator, address _linkToken, uint256 _linkFee, address proxyRegistryAddress ) payable ERC721Sequencial("Teddy Bear Squad", "TBS") Pausable() VRFConsumerBase(_vrfCoordinator, _linkToken) { _pause(); baseTokenURI = _initialURI; LINK_KEY_HASH = _keyHash; LINK_FEE = _linkFee; _proxyRegistryAddress = proxyRegistryAddress; _initializeEIP712("TeddyBearSquad"); } function purchase(uint256 _quantity) public payable nonReentrant whenNotPaused { require( block.timestamp >= presaleStartTime + publicStartInterval, "Presale only." ); require( _quantity <= PUBLIC_MINT_LIMIT, "Quantity exceeds PUBLIC_MINT_LIMIT" ); require(_quantity * PUBLIC_PRICE <= msg.value, "Not enough minerals"); if (publicWalletLimit) { require( _quantity + mintBalances[msg.sender] <= PUBLIC_MINT_LIMIT, "Quantity exceeds per-wallet limit" ); } _mint(_quantity); } function presalePurchase( uint256 _quantity, bytes32 _hash, bytes memory _signature ) external payable nonReentrant whenNotPaused { require(block.timestamp >= presaleStartTime, "Presale has not started"); require( checkHash(_hash, _signature, _SIGNER), "Address is not on Presale List" ); /// @dev Presale always enforces a per-wallet limit require( _quantity + mintBalances[msg.sender] <= PRESALE_MINT_LIMIT, "Quantity exceeds per-wallet limit" ); require(_quantity * PRESALE_PRICE <= msg.value, "Not enough minerals"); _mint(_quantity); } function _mint(uint256 _quantity) internal { require( _quantity + _owners.length <= PUBLIC_SUPPLY, "Purchase exceeds available supply" ); for (uint256 i = 0; i < _quantity; i++) { _safeMint(msg.sender); } RewardToys.updateReward(address(0), msg.sender, _quantity); mintBalances[msg.sender] += _quantity; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), '"ERC721Metadata: tokenId does not exist"'); return string(abi.encodePacked(baseTokenURI, tokenId.toString())); } function senderMessageHash() internal view returns (bytes32) { bytes32 message = keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", keccak256(abi.encodePacked(address(this), msg.sender)) ) ); return message; } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts * to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { // whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } function checkHash( bytes32 _hash, bytes memory signature, address _account ) internal view returns (bool) { bytes32 senderHash = senderMessageHash(); if (senderHash != _hash) { return false; } return _hash.recover(signature) == _account; } function transferFrom( address _from, address _to, uint256 _tokenId ) public override { RewardToys.updateReward(_from, _to, 1); ERC721Sequencial.transferFrom(_from, _to, _tokenId); } function safeTransferFrom( address _from, address _to, uint256 _tokenId ) public override { RewardToys.updateReward(_from, _to, 1); ERC721Sequencial.safeTransferFrom(_from, _to, _tokenId); } function currentPrice() external view returns (uint256) { return block.timestamp <= (presaleStartTime + publicStartInterval) ? PRESALE_PRICE : PUBLIC_PRICE; } // 。☆✼★━━━━━━━━ ( ˘▽˘)っ♨ only owner ━━━━━━━━━━━━━★✼☆。 function setSigner(address _address) external onlyOwner { _SIGNER = _address; } function setRewardTokenAddress(address _rAddress) external onlyOwner { RewardToys = IRewardToken(_rAddress); } /// @dev gift a single token to each address passed in through calldata /// @param _recipients Array of addresses to send a single token to function gift(address[] calldata _recipients) external onlyOwner { uint256 recipients = _recipients.length; require( recipients + _owners.length <= MAX_SUPPLY, "_quantity exceeds supply" ); for (uint256 i = 0; i < recipients; i++) { _safeMint(_recipients[i]); RewardToys.updateReward(address(0), _recipients[i], 1); } } function setPaused(bool _state) external onlyOwner { _state ? _pause() : _unpause(); } function setWalletLimit(bool _state) external onlyOwner { publicWalletLimit = _state; } function setTokenOffset() public onlyOwner { require(tokenOffset == 0, "Offset is already set"); requestRandomness(LINK_KEY_HASH, LINK_FEE); } // @dev chainlink callback function for requestRandomness function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { tokenOffset = randomness % MAX_SUPPLY; } function setProvenance(string memory _provenance) external onlyOwner { PROVENANCE_HASH = _provenance; } function setReveal(bool _state) external onlyOwner { isRevealed = _state; } function setBaseURI(string memory _URI) external onlyOwner { baseTokenURI = _URI; } // @dev: blockchain is forever, you never know, you might need these... function setPresalePrice(uint128 _price) external onlyOwner { PRESALE_PRICE = _price; } function setPublicPrice(uint128 _price) external onlyOwner { PUBLIC_PRICE = _price; } function setPublicLimit(uint128 _limit) external onlyOwner { PUBLIC_MINT_LIMIT = _limit; } function setPublicSuppy(uint128 _limit) external onlyOwner { PUBLIC_SUPPLY = _limit; } function setPresaleStartTime(uint256 _time) external onlyOwner { presaleStartTime = _time; } function withdraw() external onlyOwner { (bool success, ) = _treasury.call{value: address(this).balance}(""); require(success, "Failed to send to vault."); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; // ,--------.,------.,------. ,------.,--. ,--. // '--. .--'| .---'| .-. \ | .-. \\ `.' / // | | | `--, | | \ :| | \ :'. / // | | | `---.| '--' /| '--' / | | // `--' `------'`-------' `-------' `--' // ,-----. ,------. ,---. ,------. // | |) /_ | .---' / O \ | .--. ' // | .-. \| `--, | .-. || '--'.' // | '--' /| `---.| | | || |\ \ // `------' `------'`--' `--'`--' '--' // ,---. ,-----. ,--. ,--. ,---. ,------. // ' .-' ' .-. ' | | | | / O \ | .-. \ // `. `-. | | | | | | | || .-. || | \ : // .-' |' '-' '-.' '-' '| | | || '--' / // `-----' `-----'--' `-----' `--' `--'`-------' // // _ _______ ______ _______ // | |__ __/ __ \ \ / / ____| // / __) | | | | | \ \_/ / (___ // \__ \ | | | | | |\ / \___ \ // ( / | | | |__| | | | ____) | // |_| |_| \____/ |_| |_____/ // @nftchef import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol"; interface iCoreContract { function balanceOf(address owner) external view returns (uint256); } contract RewardToken is ERC20, ERC20Pausable, ERC20Burnable, Ownable { // @dev: deployed erc721 contract of NFT's earning rewards iCoreContract public CoreToken; uint256 public constant REWARD_RATE = 10 ether; // 10 year supply uint256 private immutable _cap = 365336530 ether; mapping(address => uint256) public rewards; mapping(address => uint256) public lastClaimed; mapping(address => uint256) public balances; mapping(address => bool) public accessAddresses; event RewardClaimed(address indexed user, uint256 reward); constructor(address _coreContractAddress) ERC20("Teddy Bear Squad Toys", "TOYS") { /// @dev: Initialize the erc721 contract CoreToken = iCoreContract(_coreContractAddress); } // Only callable by the erc721 contract on mint/transferFrom/safeTransferFrom. // Updates reward amount and last claimed timestamp function updateReward( address from, address to, uint256 qty ) external { require(msg.sender == address(CoreToken)); if (from != address(0)) { rewards[from] += getPendingReward(from); lastClaimed[from] = block.timestamp; balances[from] -= qty; } if (to != address(0)) { balances[to] += qty; rewards[to] += getPendingReward(to); lastClaimed[to] = block.timestamp; } } function claimReward() external whenNotPaused { uint256 claimable = rewards[msg.sender] + getPendingReward(msg.sender); require( ERC20.totalSupply() + claimable <= cap(), "ERC20Capped: cap exceeded" ); _mint(msg.sender, claimable); emit RewardClaimed(msg.sender, claimable); /// @dev: reset the state of a users claimed state and last claimed rewards[msg.sender] = 0; lastClaimed[msg.sender] = block.timestamp; } function getTotalClaimable(address user) external view returns (uint256) { return rewards[user] + getPendingReward(user); } function blocktime() public returns (uint256) { return block.timestamp; } function getPendingReward(address _user) internal view returns (uint256) { return (balances[_user] * REWARD_RATE * (block.timestamp - ( lastClaimed[_user] > 0 ? lastClaimed[_user] : block.timestamp ))) / 1 days; } // @dev: Allow the main contract to burn tokens when 'spending' function spend(address user, uint256 amount) external { require( accessAddresses[msg.sender] || msg.sender == address(CoreToken), "Address does not have permission to burn" ); _burn(user, amount); } /** * @dev Required override */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override(ERC20, ERC20Pausable) whenNotPaused { super._beforeTokenTransfer(from, to, amount); } /** * @dev Returns the cap on the token's total supply. */ function cap() public view virtual returns (uint256) { return _cap; } // 。☆✼★━━━━━━━━ ( ˘▽˘)っ♨ only owner ━━━━━━━━━━━━━★✼☆。 function setAccessAddresses(address _address, bool _access) external onlyOwner { accessAddresses[_address] = _access; } function setCoreAddress(address _address) external onlyOwner { CoreToken = iCoreContract(_address); } function togglePaused() external onlyOwner { paused() ? _unpause() : _pause(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string public constant ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712(string memory name) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT // Forked from: OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ // _______ __ __ ______ __ __ // | __|-----.-----.-----| |_|__|----. | | |--.---.-|__|-----. // | | | -__| | -__| _| | __| | ---| | _ | | | // |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__| // //------------------------------------------------------------------------------ // Genetic Chain: ERC721Sequencial //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721 * [ERC721] Non-Fungible Token Standard * * This implmentation of ERC721 assumes sequencial token creation to provide * efficient minting. Storage for balance are no longer required reducing * gas significantly. This comes at the price of calculating the balance by * iterating through the entire array. The balanceOf function should NOT * be used inside a contract. Gas usage will explode as the size of tokens * increase. A convineiance function is provided which returns the entire * list of owners whose index maps tokenIds to thier owners. Zero addresses * indicate burned tokens. * */ contract ERC721Sequencial 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 address[] _owners; // 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 balance) { require(owner != address(0), "ERC721: balance query for the zero address"); unchecked { uint256 length = _owners.length; for (uint256 i = 0; i < length; ++i) { if (_owners[i] == owner) { ++balance; } } } } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: owner query for nonexistent token"); address owner = _owners[tokenId]; return owner; } /** * @dev Returns entire list of owner enumerated by thier tokenIds. Burned tokens * will have a zero address. */ function owners() public view returns (address[] memory) { address[] memory owners_ = _owners; return owners_; } /** * @dev Return largest tokenId minted. */ function maxTokenId() public view returns (uint256) { return _owners.length > 0 ? _owners.length - 1 : 0; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Sequencial.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _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 = ERC721Sequencial.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) internal virtual returns (uint256 tokenId) { tokenId = _safeMint(to, ""); } /** * @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, bytes memory _data ) internal virtual returns (uint256 tokenId) { tokenId = _mint(to); 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) internal virtual returns (uint256 tokenId) { require(to != address(0), "ERC721: mint to the zero address"); tokenId = _owners.length; _beforeTokenTransfer(address(0), to, tokenId); _owners.push(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 = ERC721Sequencial.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); 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(ERC721Sequencial.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); _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(ERC721Sequencial.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ // _______ __ __ ______ __ __ // | __|-----.-----.-----| |_|__|----. | | |--.---.-|__|-----. // | | | -__| | -__| _| | __| | ---| | _ | | | // |_______|_____|__|__|_____|____|__|____| |______|__|__|___._|__|__|__| // //------------------------------------------------------------------------------ // Genetic Chain: ERC721SeqEnumerable //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "./ERC721Sequencial.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /** * @dev This is a no storage implemntation of the optional extension {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. These functions * are mainly for convienence and should NEVER be called from inside a * contract on the chain. */ abstract contract ERC721SeqEnumerable is ERC721Sequencial, IERC721Enumerable { address constant zero = address(0); /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721Sequencial) 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 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { if (index-- == 0) { break; } } } } require( tokenId < length, "ERC721Enumerable: owner index out of bounds" ); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256 supply) { unchecked { uint256 length = _owners.length; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { ++supply; } } } } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { if (index-- == 0) { break; } } } } require( tokenId < length, "ERC721Enumerable: global index out of bounds" ); } /** * @dev Get all tokens owned by owner. */ function ownerTokens(address owner) public view returns (uint256[] memory) { uint256 tokenCount = ERC721Sequencial.balanceOf(owner); require(tokenCount != 0, "ERC721Enumerable: owner owns no tokens"); uint256 length = _owners.length; uint256[] memory tokenIds = new uint256[](tokenCount); unchecked { uint256 i = 0; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { tokenIds[i++] = tokenId; } } } return tokenIds; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC20Pausable is ERC20, Pausable { /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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; 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; 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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 2200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_initialURI","type":"string"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_linkToken","type":"address"},{"internalType":"uint256","name":"_linkFee","type":"uint256"},{"internalType":"address","name":"proxyRegistryAddress","type":"address"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"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":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_MINT_LIMIT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_PRICE","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_MINT_LIMIT","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_PRICE","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SUPPLY","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RewardToys","outputs":[{"internalType":"contract IRewardToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","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":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ownerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"presalePurchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicStartInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicWalletLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"purchase","outputs":[],"stateMutability":"payable","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":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_price","type":"uint128"}],"name":"setPresalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setPresaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_provenance","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_limit","type":"uint128"}],"name":"setPublicLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_price","type":"uint128"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_limit","type":"uint128"}],"name":"setPublicSuppy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rAddress","type":"address"}],"name":"setRewardTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setTokenOffset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setWalletLimit","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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","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":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenOffset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e060408190526005805460ff191690557127110000000000000000000000000000267b600b55700400000000000000000000000000000007600c5577011c37937e080000000000000000000001aa535d3d0c0000600d556361eeb0e0600e5562015180600f556010805461ffff19166001179055601880546001600160a01b031916738fbc1fb5fd267afeff5cc4e69b3ca6d41567dc0117905562004f5a38819003908190833981016040819052620000b991620004b5565b604080518082018252601081526f151959191e481099585c8814dc5d585960821b60208083019182528351808501909452600384526254425360e81b908401528151879387939290916200011091600091620003f2565b50805162000126906001906020840190620003f2565b505050620001436200013d620001e660201b60201c565b620001ea565b6008805460ff60a01b1916905560016009556001600160601b0319606092831b811660a052911b16608052620001786200023c565b85516200018d906014906020890190620003f2565b50601a85905560198290556001600160601b0319606082901b1660c05260408051808201909152600e81526d151959191e5099585c94dc5d585960921b6020820152620001da90620002ef565b50505050505062000631565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b62000250600854600160a01b900460ff1690565b15620002965760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620002d23390565b6040516001600160a01b03909116815260200160405180910390a1565b60055460ff1615620003355760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b60448201526064016200028d565b620003408162000350565b506005805460ff19166001179055565b6040518060800160405280604f815260200162004f0b604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600655565b8280546200040090620005de565b90600052602060002090601f0160209004810192826200042457600085556200046f565b82601f106200043f57805160ff19168380011785556200046f565b828001600101855582156200046f579182015b828111156200046f57825182559160200191906001019062000452565b506200047d92915062000481565b5090565b5b808211156200047d576000815560010162000482565b80516001600160a01b0381168114620004b057600080fd5b919050565b60008060008060008060c08789031215620004cf57600080fd5b86516001600160401b0380821115620004e757600080fd5b818901915089601f830112620004fc57600080fd5b8151818111156200051157620005116200061b565b604051601f8201601f19908116603f011681019083821181831017156200053c576200053c6200061b565b81604052828152602093508c848487010111156200055957600080fd5b600091505b828210156200057d57848201840151818301850152908301906200055e565b828211156200058f5760008484830101525b809a505050508089015196505050620005ab6040880162000498565b9350620005bb6060880162000498565b925060808701519150620005d260a0880162000498565b90509295509295509295565b600181811c90821680620005f357607f821691505b602082108114156200061557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160601c60c05160601c61489a6200067160003960006123f3015260008181611bd60152612c7d01526000612c4e015261489a6000f3fe6080604052600436106103a25760003560e01c806370a08231116101e7578063b88d4fde1161010d578063dc8c57b4116100a0578063f5ebec801161006f578063f5ebec8014610ad3578063ff1b655614610afa578063ff56177a14610b0f578063ffe630b514610b2f57600080fd5b8063dc8c57b414610a6a578063e985e9c514610a80578063efef39a114610aa0578063f2fde38b14610ab357600080fd5b8063bceae77b116100dc578063bceae77b146109f7578063bf34be4414610a17578063c86768d814610a37578063c87b56dd14610a4a57600080fd5b8063b88d4fde1461095d578063b8fa1b9c1461097d578063bba7723e1461099d578063bc56602f146109ca57600080fd5b806395d89b4111610185578063a72b923e11610154578063a72b923e146108eb578063a82524b21461090b578063abd0359614610921578063affe39c11461093b57600080fd5b806395d89b41146108815780639a6acf20146108965780639d1b464a146108b6578063a22cb465146108cb57600080fd5b80638342083a116101c15780638342083a1461080e5780638da5cb5b1461082e57806391ba317a1461084c57806394985ddd1461086157600080fd5b806370a08231146107b9578063715018a6146107d95780638033260a146107ee57600080fd5b80632f745c59116102cc57806354214f691161026a57806362dc6e211161023957806362dc6e21146107325780636352211e146107595780636c19e783146107795780636cf806901461079957600080fd5b806354214f69146106b457806355f804b3146106d35780635c975abb146106f3578063611f3f101461071257600080fd5b80633ccfd60b116102a65780633ccfd60b1461064957806342842e0e1461065e578063450c500a1461067e5780634f6ccce71461069457600080fd5b80632f745c59146105d757806332cb6b0c146105f75780633408e4701461063657600080fd5b8063163e1e611161034457806323b872dd1161031357806323b872dd14610541578063296cab55146105615780632a3f300c146105815780632d0335ab146105a157600080fd5b8063163e1e61146104c957806316c38b3c146104e957806318160ddd1461050957806320379ee51461052c57600080fd5b8063095ea7b311610380578063095ea7b3146104365780630c53c51c146104585780630f1876a21461046b5780630f7e59701461048057600080fd5b806301ffc9a7146103a757806306fdde03146103dc578063081812fc146103fe575b600080fd5b3480156103b357600080fd5b506103c76103c23660046142ec565b610b4f565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b93565b6040516103d39190614675565b34801561040a57600080fd5b5061041e6104193660046143b5565b610c25565b6040516001600160a01b0390911681526020016103d3565b34801561044257600080fd5b506104566104513660046141ef565b610cc3565b005b6103f1610466366004614171565b610df5565b34801561047757600080fd5b50610456610ffb565b34801561048c57600080fd5b506103f16040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b3480156104d557600080fd5b506104566104e436600461421b565b6110b6565b3480156104f557600080fd5b50610456610504366004614290565b611276565b34801561051557600080fd5b5061051e6112e5565b6040519081526020016103d3565b34801561053857600080fd5b5060065461051e565b34801561054d57600080fd5b5061045661055c366004614096565b611341565b34801561056d57600080fd5b5061045661057c3660046143b5565b6113ba565b34801561058d57600080fd5b5061045661059c366004614290565b611419565b3480156105ad57600080fd5b5061051e6105bc366004614040565b6001600160a01b031660009081526007602052604090205490565b3480156105e357600080fd5b5061051e6105f23660046141ef565b6114aa565b34801561060357600080fd5b50600b5461061e90600160801b90046001600160801b031681565b6040516001600160801b0390911681526020016103d3565b34801561064257600080fd5b504661051e565b34801561065557600080fd5b50610456611587565b34801561066a57600080fd5b50610456610679366004614096565b611684565b34801561068a57600080fd5b5061051e600f5481565b3480156106a057600080fd5b5061051e6106af3660046143b5565b6116fd565b3480156106c057600080fd5b506010546103c790610100900460ff1681565b3480156106df57600080fd5b506104566106ee366004614343565b6117d9565b3480156106ff57600080fd5b50600854600160a01b900460ff166103c7565b34801561071e57600080fd5b50600d5461061e906001600160801b031681565b34801561073e57600080fd5b50600d5461061e90600160801b90046001600160801b031681565b34801561076557600080fd5b5061041e6107743660046143b5565b61184a565b34801561078557600080fd5b50610456610794366004614040565b6118f8565b3480156107a557600080fd5b506104566107b4366004614290565b611981565b3480156107c557600080fd5b5061051e6107d4366004614040565b6119ee565b3480156107e557600080fd5b50610456611ac8565b3480156107fa57600080fd5b5061045661080936600461438c565b611b2e565b34801561081a57600080fd5b50600b5461061e906001600160801b031681565b34801561083a57600080fd5b506008546001600160a01b031661041e565b34801561085857600080fd5b5061051e611ba7565b34801561086d57600080fd5b5061045661087c3660046142ca565b611bcb565b34801561088d57600080fd5b506103f1611c4d565b3480156108a257600080fd5b506104566108b1366004614040565b611c5c565b3480156108c257600080fd5b5061051e611ce5565b3480156108d757600080fd5b506104566108e6366004614143565b611d31565b3480156108f757600080fd5b5060175461041e906001600160a01b031681565b34801561091757600080fd5b5061051e600e5481565b34801561092d57600080fd5b506010546103c79060ff1681565b34801561094757600080fd5b50610950611d3c565b6040516103d391906145f0565b34801561096957600080fd5b506104566109783660046140d7565b611da2565b34801561098957600080fd5b5061045661099836600461438c565b611e2a565b3480156109a957600080fd5b506109bd6109b8366004614040565b611eaf565b6040516103d3919061463d565b3480156109d657600080fd5b5061051e6109e5366004614040565b60126020526000908152604090205481565b348015610a0357600080fd5b50600c5461061e906001600160801b031681565b348015610a2357600080fd5b50610456610a3236600461438c565b611ff8565b610456610a453660046143ce565b61207d565b348015610a5657600080fd5b506103f1610a653660046143b5565b612309565b348015610a7657600080fd5b5061051e60135481565b348015610a8c57600080fd5b506103c7610a9b36600461405d565b6123b8565b610456610aae3660046143b5565b6124bf565b348015610abf57600080fd5b50610456610ace366004614040565b612770565b348015610adf57600080fd5b50600c5461061e90600160801b90046001600160801b031681565b348015610b0657600080fd5b506103f161284f565b348015610b1b57600080fd5b50610456610b2a36600461438c565b6128dd565b348015610b3b57600080fd5b50610456610b4a366004614343565b612962565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b8d5750610b8d826129cf565b92915050565b606060008054610ba290614716565b80601f0160208091040260200160405190810160405280929190818152602001828054610bce90614716565b8015610c1b5780601f10610bf057610100808354040283529160200191610c1b565b820191906000526020600020905b815481529060010190602001808311610bfe57829003601f168201915b5050505050905090565b6000610c3082612a6a565b610ca75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b6000610cce8261184a565b9050806001600160a01b0316836001600160a01b03161415610d585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b336001600160a01b0382161480610d745750610d7481336123b8565b610de65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c9e565b610df08383612ab4565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610e338782878787612b2f565b610ea55760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6001600160a01b038716600090815260076020526040902054610ec9906001612c37565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610f1990899033908a90614560565b60405180910390a1600080306001600160a01b0316888a604051602001610f41929190614482565b60408051601f1981840301815290829052610f5b91614466565b6000604051808303816000865af19150503d8060008114610f98576040519150601f19603f3d011682016040523d82523d6000602084013e610f9d565b606091505b509150915081610fef5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610c9e565b98975050505050505050565b6008546001600160a01b031633146110555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b601354156110a55760405162461bcd60e51b815260206004820152601560248201527f4f666673657420697320616c72656164792073657400000000000000000000006044820152606401610c9e565b6110b3601a54601954612c4a565b50565b6008546001600160a01b031633146111105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600b546002548291600160801b90046001600160801b0316906111339083614688565b11156111815760405162461bcd60e51b815260206004820152601860248201527f5f7175616e74697479206578636565647320737570706c7900000000000000006044820152606401610c9e565b60005b81811015611270576111bb8484838181106111a1576111a16147bc565b90506020020160208101906111b69190614040565b612dd5565b506017546001600160a01b0316632c8e8dfa60008686858181106111e1576111e16147bc565b90506020020160208101906111f69190614040565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260016044820152606401600060405180830381600087803b15801561124557600080fd5b505af1158015611259573d6000803e3d6000fd5b5050505080806112689061474b565b915050611184565b50505050565b6008546001600160a01b031633146112d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b806112dd576110b3612df0565b6110b3612eb1565b600254600090815b8181101561133c5760006001600160a01b031660028281548110611313576113136147bc565b6000918252602090912001546001600160a01b031614611334578260010192505b6001016112ed565b505090565b60175460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526001604483015290911690632c8e8dfa90606401600060405180830381600087803b15801561139757600080fd5b505af11580156113ab573d6000803e3d6000fd5b50505050610df0838383612f61565b6008546001600160a01b031633146114145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600e55565b6008546001600160a01b031633146114735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b60108054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b6002546000905b8082101561150b57836001600160a01b0316600283815481106114d6576114d66147bc565b6000918252602090912001546001600160a01b03161415611500576000198301926115005761150b565b8160010191506114b1565b8082106115805760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c9e565b5092915050565b6008546001600160a01b031633146115e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6018546040516000916001600160a01b03169047908381818185875af1925050503d806000811461162e576040519150601f19603f3d011682016040523d82523d6000602084013e611633565b606091505b50509050806110b35760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e6420746f207661756c742e00000000000000006044820152606401610c9e565b60175460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526001604483015290911690632c8e8dfa90606401600060405180830381600087803b1580156116da57600080fd5b505af11580156116ee573d6000803e3d6000fd5b50505050610df0838383612fe8565b6002546000905b8082101561175e5760006001600160a01b03166002838154811061172a5761172a6147bc565b6000918252602090912001546001600160a01b031614611753576000198301926117535761175e565b816001019150611704565b8082106117d35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c9e565b50919050565b6008546001600160a01b031633146118335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b8051611846906014906020840190613f11565b5050565b600061185582612a6a565b6118c75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c9e565b6000600283815481106118dc576118dc6147bc565b6000918252602090912001546001600160a01b03169392505050565b6008546001600160a01b031633146119525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6016805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6008546001600160a01b031633146119db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6010805460ff1916911515919091179055565b60006001600160a01b038216611a6c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c9e565b60025460005b81811015611ac157836001600160a01b031660028281548110611a9757611a976147bc565b6000918252602090912001546001600160a01b03161415611ab9578260010192505b600101611a72565b5050919050565b6008546001600160a01b03163314611b225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b611b2c6000613003565b565b6008546001600160a01b03163314611b885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600d80546001600160801b03928316600160801b029216919091179055565b600254600090611bb75750600090565b600254611bc6906001906146d3565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611c435760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610c9e565b6118468282613062565b606060018054610ba290614716565b6008546001600160a01b03163314611cb65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6017805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000600f54600e54611cf79190614688565b421115611d0f57600d546001600160801b0316611d23565b600d54600160801b90046001600160801b03165b6001600160801b0316905090565b611846338383613086565b606060006002805480602002602001604051908101604052809291908181526020018280548015611d9657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d78575b50939695505050505050565b611dac3383613155565b611e1e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c9e565b61127084848484613228565b6008546001600160a01b03163314611e845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600d80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b60606000611ebc836119ee565b905080611f315760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f2060448201527f746f6b656e7300000000000000000000000000000000000000000000000000006064820152608401610c9e565b60025460008267ffffffffffffffff811115611f4f57611f4f6147d2565b604051908082528060200260200182016040528015611f78578160200160208202803683370190505b5090506000805b83811015611fed57866001600160a01b031660028281548110611fa457611fa46147bc565b6000918252602090912001546001600160a01b03161415611fe55780838380600101945081518110611fd857611fd86147bc565b6020026020010181815250505b600101611f7f565b509095945050505050565b6008546001600160a01b031633146120525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600c80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b600260095414156120d05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c9e565b6002600955600854600160a01b900460ff161561212f5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600e544210156121815760405162461bcd60e51b815260206004820152601760248201527f50726573616c6520686173206e6f7420737461727465640000000000000000006044820152606401610c9e565b60165461219a90839083906001600160a01b03166132b1565b6121e65760405162461bcd60e51b815260206004820152601e60248201527f41646472657373206973206e6f74206f6e2050726573616c65204c69737400006044820152606401610c9e565b600c5433600090815260126020526040902054600160801b9091046001600160801b0316906122159085614688565b11156122895760405162461bcd60e51b815260206004820152602160248201527f5175616e746974792065786365656473207065722d77616c6c6574206c696d6960448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b600d5434906122a890600160801b90046001600160801b0316856146b4565b11156122f65760405162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768206d696e6572616c73000000000000000000000000006044820152606401610c9e565b6122ff8361337e565b5050600160095550565b606061231482612a6a565b6123865760405162461bcd60e51b815260206004820152602860248201527f224552433732314d657461646174613a20746f6b656e496420646f6573206e6f60448201527f74206578697374220000000000000000000000000000000000000000000000006064820152608401610c9e565b6014612391836134c9565b6040516020016123a29291906144b9565b6040516020818303038152906040529050919050565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526000917f000000000000000000000000000000000000000000000000000000000000000091848116919083169063c45527919060240160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124749190614326565b6001600160a01b0316141561248d576001915050610b8d565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b600260095414156125125760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c9e565b6002600955600854600160a01b900460ff16156125715760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600f54600e546125819190614688565b4210156125d05760405162461bcd60e51b815260206004820152600d60248201527f50726573616c65206f6e6c792e000000000000000000000000000000000000006044820152606401610c9e565b600c546001600160801b03168111156126515760405162461bcd60e51b815260206004820152602260248201527f5175616e746974792065786365656473205055424c49435f4d494e545f4c494d60448201527f49540000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b600d543490612669906001600160801b0316836146b4565b11156126b75760405162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768206d696e6572616c73000000000000000000000000006044820152606401610c9e565b60105460ff161561275f57600c54336000908152601260205260409020546001600160801b03909116906126eb9083614688565b111561275f5760405162461bcd60e51b815260206004820152602160248201527f5175616e746974792065786365656473207065722d77616c6c6574206c696d6960448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6127688161337e565b506001600955565b6008546001600160a01b031633146127ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6001600160a01b0381166128465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c9e565b6110b381613003565b6011805461285c90614716565b80601f016020809104026020016040519081016040528092919081815260200182805461288890614716565b80156128d55780601f106128aa576101008083540402835291602001916128d5565b820191906000526020600020905b8154815290600101906020018083116128b857829003601f168201915b505050505081565b6008546001600160a01b031633146129375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600b80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b6008546001600160a01b031633146129bc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b8051611846906011906020840190613f11565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612a3257506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b8d57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610b8d565b60025460009082108015610b8d575060006001600160a01b031660028381548110612a9757612a976147bc565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190612af68261184a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616612bad5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6001612bc0612bbb876135fb565b613678565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015612c0e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000612c438284614688565b9392505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001612cba929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401612ce7939291906145c8565b602060405180830381600087803b158015612d0157600080fd5b505af1158015612d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d3991906142ad565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052612d95906001614688565b6000858152600a60205260409020556124b78482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000610b8d82604051806020016040528060008152506136c3565b600854600160a01b900460ff16612e495760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c9e565b600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600854600160a01b900460ff1615612f0b5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e943390565b612f6b3382613155565b612fdd5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c9e565b610df083838361374f565b610df083838360405180602001604052806000815250611da2565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b5461307f90600160801b90046001600160801b031682614766565b6013555050565b816001600160a01b0316836001600160a01b031614156130e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c9e565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600061316082612a6a565b6131d25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c9e565b60006131dd8361184a565b9050806001600160a01b0316846001600160a01b031614806132185750836001600160a01b031661320d84610c25565b6001600160a01b0316145b806124b757506124b781856123b8565b61323384848461374f565b61323f848484846138df565b6112705760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b6000806133446040805130606090811b6bffffffffffffffffffffffff199081166020808501919091523390921b166034830152825160288184030181526048830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060688401526084808401919091528351808403909101815260a4909201909252805191012090565b9050848114613357576000915050612c43565b6001600160a01b03831661336b8686613a71565b6001600160a01b03161495945050505050565b600b546002546001600160801b039091169061339a9083614688565b111561340e5760405162461bcd60e51b815260206004820152602160248201527f5075726368617365206578636565647320617661696c61626c6520737570706c60448201527f79000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b60005b818110156134355761342233612dd5565b508061342d8161474b565b915050613411565b5060175460405163164746fd60e11b815260006004820152336024820152604481018390526001600160a01b0390911690632c8e8dfa90606401600060405180830381600087803b15801561348957600080fd5b505af115801561349d573d6000803e3d6000fd5b505033600090815260126020526040812080548594509092506134c1908490614688565b909155505050565b60608161350957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613533578061351d8161474b565b915061352c9050600a836146a0565b915061350d565b60008167ffffffffffffffff81111561354e5761354e6147d2565b6040519080825280601f01601f191660200182016040528015613578576020820181803683370190505b5090505b84156124b75761358d6001836146d3565b915061359a600a86614766565b6135a5906030614688565b60f81b8183815181106135ba576135ba6147bc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506135f4600a866146a0565b945061357c565b6000604051806080016040528060438152602001614822604391398051602091820120835184830151604080870151805190860120905161365b950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061368360065490565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620161365b565b60006136ce83613a95565b90506136dd60008483856138df565b610b8d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b826001600160a01b03166137628261184a565b6001600160a01b0316146137de5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c9e565b6001600160a01b0382166138595760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b613864600082612ab4565b8160028281548110613878576138786147bc565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006001600160a01b0384163b15613a69576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061393c90339089908890889060040161458c565b602060405180830381600087803b15801561395657600080fd5b505af1925050508015613986575060408051601f3d908101601f1916820190925261398391810190614309565b60015b613a36573d8080156139b4576040519150601f19603f3d011682016040523d82523d6000602084013e6139b9565b606091505b508051613a2e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506124b7565b5060016124b7565b6000806000613a808585613b7b565b91509150613a8d81613beb565b509392505050565b60006001600160a01b038216613aed5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c9e565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b600080825160411415613bb25760208301516040840151606085015160001a613ba687828585613ddc565b94509450505050613be4565b825160401415613bdc5760208301516040840151613bd1868383613ec9565b935093505050613be4565b506000905060025b9250929050565b6000816004811115613bff57613bff6147a6565b1415613c085750565b6001816004811115613c1c57613c1c6147a6565b1415613c6a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c9e565b6002816004811115613c7e57613c7e6147a6565b1415613ccc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c9e565b6003816004811115613ce057613ce06147a6565b1415613d545760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6004816004811115613d6857613d686147a6565b14156110b35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e135750600090506003613ec0565b8460ff16601b14158015613e2b57508460ff16601c14155b15613e3c5750600090506004613ec0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613e90573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613eb957600060019250925050613ec0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613f0387828885613ddc565b935093505050935093915050565b828054613f1d90614716565b90600052602060002090601f016020900481019282613f3f5760008555613f85565b82601f10613f5857805160ff1916838001178555613f85565b82800160010185558215613f85579182015b82811115613f85578251825591602001919060010190613f6a565b50613f91929150613f95565b5090565b5b80821115613f915760008155600101613f96565b600067ffffffffffffffff80841115613fc557613fc56147d2565b604051601f8501601f19908116603f01168101908282118183101715613fed57613fed6147d2565b8160405280935085815286868601111561400657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261403157600080fd5b612c4383833560208501613faa565b60006020828403121561405257600080fd5b8135612c43816147e8565b6000806040838503121561407057600080fd5b823561407b816147e8565b9150602083013561408b816147e8565b809150509250929050565b6000806000606084860312156140ab57600080fd5b83356140b6816147e8565b925060208401356140c6816147e8565b929592945050506040919091013590565b600080600080608085870312156140ed57600080fd5b84356140f8816147e8565b93506020850135614108816147e8565b925060408501359150606085013567ffffffffffffffff81111561412b57600080fd5b61413787828801614020565b91505092959194509250565b6000806040838503121561415657600080fd5b8235614161816147e8565b9150602083013561408b816147fd565b600080600080600060a0868803121561418957600080fd5b8535614194816147e8565b9450602086013567ffffffffffffffff8111156141b057600080fd5b6141bc88828901614020565b9450506040860135925060608601359150608086013560ff811681146141e157600080fd5b809150509295509295909350565b6000806040838503121561420257600080fd5b823561420d816147e8565b946020939093013593505050565b6000806020838503121561422e57600080fd5b823567ffffffffffffffff8082111561424657600080fd5b818501915085601f83011261425a57600080fd5b81358181111561426957600080fd5b8660208260051b850101111561427e57600080fd5b60209290920196919550909350505050565b6000602082840312156142a257600080fd5b8135612c43816147fd565b6000602082840312156142bf57600080fd5b8151612c43816147fd565b600080604083850312156142dd57600080fd5b50508035926020909101359150565b6000602082840312156142fe57600080fd5b8135612c438161480b565b60006020828403121561431b57600080fd5b8151612c438161480b565b60006020828403121561433857600080fd5b8151612c43816147e8565b60006020828403121561435557600080fd5b813567ffffffffffffffff81111561436c57600080fd5b8201601f8101841361437d57600080fd5b6124b784823560208401613faa565b60006020828403121561439e57600080fd5b81356001600160801b0381168114612c4357600080fd5b6000602082840312156143c757600080fd5b5035919050565b6000806000606084860312156143e357600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561440857600080fd5b61441486828701614020565b9150509250925092565b600081518084526144368160208601602086016146ea565b601f01601f19169290920160200192915050565b6000815161445c8185602086016146ea565b9290920192915050565b600082516144788184602087016146ea565b9190910192915050565b600083516144948184602088016146ea565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600080845481600182811c9150808316806144d557607f831692505b60208084108214156144f557634e487b7160e01b86526022600452602486fd5b818015614509576001811461451a57614547565b60ff19861689528489019650614547565b60008b81526020902060005b8681101561453f5781548b820152908501908301614526565b505084890196505b505050505050614557818561444a565b95945050505050565b60006001600160a01b03808616835280851660208401525060606040830152614557606083018461441e565b60006001600160a01b038087168352808616602084015250836040830152608060608301526145be608083018461441e565b9695505050505050565b6001600160a01b0384168152826020820152606060408201526000614557606083018461441e565b6020808252825182820181905260009190848201906040850190845b818110156146315783516001600160a01b03168352928401929184019160010161460c565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561463157835183529284019291840191600101614659565b602081526000612c43602083018461441e565b6000821982111561469b5761469b61477a565b500190565b6000826146af576146af614790565b500490565b60008160001904831182151516156146ce576146ce61477a565b500290565b6000828210156146e5576146e561477a565b500390565b60005b838110156147055781810151838201526020016146ed565b838111156112705750506000910152565b600181811c9082168061472a57607f821691505b602082108114156117d357634e487b7160e01b600052602260045260246000fd5b600060001982141561475f5761475f61477a565b5060010190565b60008261477557614775614790565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110b357600080fd5b80151581146110b357600080fd5b6001600160e01b0319811681146110b357600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220cb133cfa995dd7f8f2ddeb6b9216aa2c20f5d5bf9b7a00dc8a35d8cac203957e64736f6c63430008070033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c742900000000000000000000000000000000000000000000000000000000000000c0aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000002868747470733a2f2f6d696e742e74656464796265617273717561642e696f2f6d657461646174612f000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103a25760003560e01c806370a08231116101e7578063b88d4fde1161010d578063dc8c57b4116100a0578063f5ebec801161006f578063f5ebec8014610ad3578063ff1b655614610afa578063ff56177a14610b0f578063ffe630b514610b2f57600080fd5b8063dc8c57b414610a6a578063e985e9c514610a80578063efef39a114610aa0578063f2fde38b14610ab357600080fd5b8063bceae77b116100dc578063bceae77b146109f7578063bf34be4414610a17578063c86768d814610a37578063c87b56dd14610a4a57600080fd5b8063b88d4fde1461095d578063b8fa1b9c1461097d578063bba7723e1461099d578063bc56602f146109ca57600080fd5b806395d89b4111610185578063a72b923e11610154578063a72b923e146108eb578063a82524b21461090b578063abd0359614610921578063affe39c11461093b57600080fd5b806395d89b41146108815780639a6acf20146108965780639d1b464a146108b6578063a22cb465146108cb57600080fd5b80638342083a116101c15780638342083a1461080e5780638da5cb5b1461082e57806391ba317a1461084c57806394985ddd1461086157600080fd5b806370a08231146107b9578063715018a6146107d95780638033260a146107ee57600080fd5b80632f745c59116102cc57806354214f691161026a57806362dc6e211161023957806362dc6e21146107325780636352211e146107595780636c19e783146107795780636cf806901461079957600080fd5b806354214f69146106b457806355f804b3146106d35780635c975abb146106f3578063611f3f101461071257600080fd5b80633ccfd60b116102a65780633ccfd60b1461064957806342842e0e1461065e578063450c500a1461067e5780634f6ccce71461069457600080fd5b80632f745c59146105d757806332cb6b0c146105f75780633408e4701461063657600080fd5b8063163e1e611161034457806323b872dd1161031357806323b872dd14610541578063296cab55146105615780632a3f300c146105815780632d0335ab146105a157600080fd5b8063163e1e61146104c957806316c38b3c146104e957806318160ddd1461050957806320379ee51461052c57600080fd5b8063095ea7b311610380578063095ea7b3146104365780630c53c51c146104585780630f1876a21461046b5780630f7e59701461048057600080fd5b806301ffc9a7146103a757806306fdde03146103dc578063081812fc146103fe575b600080fd5b3480156103b357600080fd5b506103c76103c23660046142ec565b610b4f565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506103f1610b93565b6040516103d39190614675565b34801561040a57600080fd5b5061041e6104193660046143b5565b610c25565b6040516001600160a01b0390911681526020016103d3565b34801561044257600080fd5b506104566104513660046141ef565b610cc3565b005b6103f1610466366004614171565b610df5565b34801561047757600080fd5b50610456610ffb565b34801561048c57600080fd5b506103f16040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b3480156104d557600080fd5b506104566104e436600461421b565b6110b6565b3480156104f557600080fd5b50610456610504366004614290565b611276565b34801561051557600080fd5b5061051e6112e5565b6040519081526020016103d3565b34801561053857600080fd5b5060065461051e565b34801561054d57600080fd5b5061045661055c366004614096565b611341565b34801561056d57600080fd5b5061045661057c3660046143b5565b6113ba565b34801561058d57600080fd5b5061045661059c366004614290565b611419565b3480156105ad57600080fd5b5061051e6105bc366004614040565b6001600160a01b031660009081526007602052604090205490565b3480156105e357600080fd5b5061051e6105f23660046141ef565b6114aa565b34801561060357600080fd5b50600b5461061e90600160801b90046001600160801b031681565b6040516001600160801b0390911681526020016103d3565b34801561064257600080fd5b504661051e565b34801561065557600080fd5b50610456611587565b34801561066a57600080fd5b50610456610679366004614096565b611684565b34801561068a57600080fd5b5061051e600f5481565b3480156106a057600080fd5b5061051e6106af3660046143b5565b6116fd565b3480156106c057600080fd5b506010546103c790610100900460ff1681565b3480156106df57600080fd5b506104566106ee366004614343565b6117d9565b3480156106ff57600080fd5b50600854600160a01b900460ff166103c7565b34801561071e57600080fd5b50600d5461061e906001600160801b031681565b34801561073e57600080fd5b50600d5461061e90600160801b90046001600160801b031681565b34801561076557600080fd5b5061041e6107743660046143b5565b61184a565b34801561078557600080fd5b50610456610794366004614040565b6118f8565b3480156107a557600080fd5b506104566107b4366004614290565b611981565b3480156107c557600080fd5b5061051e6107d4366004614040565b6119ee565b3480156107e557600080fd5b50610456611ac8565b3480156107fa57600080fd5b5061045661080936600461438c565b611b2e565b34801561081a57600080fd5b50600b5461061e906001600160801b031681565b34801561083a57600080fd5b506008546001600160a01b031661041e565b34801561085857600080fd5b5061051e611ba7565b34801561086d57600080fd5b5061045661087c3660046142ca565b611bcb565b34801561088d57600080fd5b506103f1611c4d565b3480156108a257600080fd5b506104566108b1366004614040565b611c5c565b3480156108c257600080fd5b5061051e611ce5565b3480156108d757600080fd5b506104566108e6366004614143565b611d31565b3480156108f757600080fd5b5060175461041e906001600160a01b031681565b34801561091757600080fd5b5061051e600e5481565b34801561092d57600080fd5b506010546103c79060ff1681565b34801561094757600080fd5b50610950611d3c565b6040516103d391906145f0565b34801561096957600080fd5b506104566109783660046140d7565b611da2565b34801561098957600080fd5b5061045661099836600461438c565b611e2a565b3480156109a957600080fd5b506109bd6109b8366004614040565b611eaf565b6040516103d3919061463d565b3480156109d657600080fd5b5061051e6109e5366004614040565b60126020526000908152604090205481565b348015610a0357600080fd5b50600c5461061e906001600160801b031681565b348015610a2357600080fd5b50610456610a3236600461438c565b611ff8565b610456610a453660046143ce565b61207d565b348015610a5657600080fd5b506103f1610a653660046143b5565b612309565b348015610a7657600080fd5b5061051e60135481565b348015610a8c57600080fd5b506103c7610a9b36600461405d565b6123b8565b610456610aae3660046143b5565b6124bf565b348015610abf57600080fd5b50610456610ace366004614040565b612770565b348015610adf57600080fd5b50600c5461061e90600160801b90046001600160801b031681565b348015610b0657600080fd5b506103f161284f565b348015610b1b57600080fd5b50610456610b2a36600461438c565b6128dd565b348015610b3b57600080fd5b50610456610b4a366004614343565b612962565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610b8d5750610b8d826129cf565b92915050565b606060008054610ba290614716565b80601f0160208091040260200160405190810160405280929190818152602001828054610bce90614716565b8015610c1b5780601f10610bf057610100808354040283529160200191610c1b565b820191906000526020600020905b815481529060010190602001808311610bfe57829003601f168201915b5050505050905090565b6000610c3082612a6a565b610ca75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b6000610cce8261184a565b9050806001600160a01b0316836001600160a01b03161415610d585760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b336001600160a01b0382161480610d745750610d7481336123b8565b610de65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c9e565b610df08383612ab4565b505050565b60408051606081810183526001600160a01b03881660008181526007602090815290859020548452830152918101869052610e338782878787612b2f565b610ea55760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d61746360448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6001600160a01b038716600090815260076020526040902054610ec9906001612c37565b6001600160a01b0388166000908152600760205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610f1990899033908a90614560565b60405180910390a1600080306001600160a01b0316888a604051602001610f41929190614482565b60408051601f1981840301815290829052610f5b91614466565b6000604051808303816000865af19150503d8060008114610f98576040519150601f19603f3d011682016040523d82523d6000602084013e610f9d565b606091505b509150915081610fef5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c000000006044820152606401610c9e565b98975050505050505050565b6008546001600160a01b031633146110555760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b601354156110a55760405162461bcd60e51b815260206004820152601560248201527f4f666673657420697320616c72656164792073657400000000000000000000006044820152606401610c9e565b6110b3601a54601954612c4a565b50565b6008546001600160a01b031633146111105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600b546002548291600160801b90046001600160801b0316906111339083614688565b11156111815760405162461bcd60e51b815260206004820152601860248201527f5f7175616e74697479206578636565647320737570706c7900000000000000006044820152606401610c9e565b60005b81811015611270576111bb8484838181106111a1576111a16147bc565b90506020020160208101906111b69190614040565b612dd5565b506017546001600160a01b0316632c8e8dfa60008686858181106111e1576111e16147bc565b90506020020160208101906111f69190614040565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260016044820152606401600060405180830381600087803b15801561124557600080fd5b505af1158015611259573d6000803e3d6000fd5b5050505080806112689061474b565b915050611184565b50505050565b6008546001600160a01b031633146112d05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b806112dd576110b3612df0565b6110b3612eb1565b600254600090815b8181101561133c5760006001600160a01b031660028281548110611313576113136147bc565b6000918252602090912001546001600160a01b031614611334578260010192505b6001016112ed565b505090565b60175460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526001604483015290911690632c8e8dfa90606401600060405180830381600087803b15801561139757600080fd5b505af11580156113ab573d6000803e3d6000fd5b50505050610df0838383612f61565b6008546001600160a01b031633146114145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600e55565b6008546001600160a01b031633146114735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b60108054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b6002546000905b8082101561150b57836001600160a01b0316600283815481106114d6576114d66147bc565b6000918252602090912001546001600160a01b03161415611500576000198301926115005761150b565b8160010191506114b1565b8082106115805760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610c9e565b5092915050565b6008546001600160a01b031633146115e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6018546040516000916001600160a01b03169047908381818185875af1925050503d806000811461162e576040519150601f19603f3d011682016040523d82523d6000602084013e611633565b606091505b50509050806110b35760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f2073656e6420746f207661756c742e00000000000000006044820152606401610c9e565b60175460405163164746fd60e11b81526001600160a01b03858116600483015284811660248301526001604483015290911690632c8e8dfa90606401600060405180830381600087803b1580156116da57600080fd5b505af11580156116ee573d6000803e3d6000fd5b50505050610df0838383612fe8565b6002546000905b8082101561175e5760006001600160a01b03166002838154811061172a5761172a6147bc565b6000918252602090912001546001600160a01b031614611753576000198301926117535761175e565b816001019150611704565b8082106117d35760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610c9e565b50919050565b6008546001600160a01b031633146118335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b8051611846906014906020840190613f11565b5050565b600061185582612a6a565b6118c75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c9e565b6000600283815481106118dc576118dc6147bc565b6000918252602090912001546001600160a01b03169392505050565b6008546001600160a01b031633146119525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6016805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6008546001600160a01b031633146119db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6010805460ff1916911515919091179055565b60006001600160a01b038216611a6c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c9e565b60025460005b81811015611ac157836001600160a01b031660028281548110611a9757611a976147bc565b6000918252602090912001546001600160a01b03161415611ab9578260010192505b600101611a72565b5050919050565b6008546001600160a01b03163314611b225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b611b2c6000613003565b565b6008546001600160a01b03163314611b885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600d80546001600160801b03928316600160801b029216919091179055565b600254600090611bb75750600090565b600254611bc6906001906146d3565b905090565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614611c435760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610c9e565b6118468282613062565b606060018054610ba290614716565b6008546001600160a01b03163314611cb65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6017805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000600f54600e54611cf79190614688565b421115611d0f57600d546001600160801b0316611d23565b600d54600160801b90046001600160801b03165b6001600160801b0316905090565b611846338383613086565b606060006002805480602002602001604051908101604052809291908181526020018280548015611d9657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611d78575b50939695505050505050565b611dac3383613155565b611e1e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c9e565b61127084848484613228565b6008546001600160a01b03163314611e845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600d80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b60606000611ebc836119ee565b905080611f315760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f2060448201527f746f6b656e7300000000000000000000000000000000000000000000000000006064820152608401610c9e565b60025460008267ffffffffffffffff811115611f4f57611f4f6147d2565b604051908082528060200260200182016040528015611f78578160200160208202803683370190505b5090506000805b83811015611fed57866001600160a01b031660028281548110611fa457611fa46147bc565b6000918252602090912001546001600160a01b03161415611fe55780838380600101945081518110611fd857611fd86147bc565b6020026020010181815250505b600101611f7f565b509095945050505050565b6008546001600160a01b031633146120525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600c80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b600260095414156120d05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c9e565b6002600955600854600160a01b900460ff161561212f5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600e544210156121815760405162461bcd60e51b815260206004820152601760248201527f50726573616c6520686173206e6f7420737461727465640000000000000000006044820152606401610c9e565b60165461219a90839083906001600160a01b03166132b1565b6121e65760405162461bcd60e51b815260206004820152601e60248201527f41646472657373206973206e6f74206f6e2050726573616c65204c69737400006044820152606401610c9e565b600c5433600090815260126020526040902054600160801b9091046001600160801b0316906122159085614688565b11156122895760405162461bcd60e51b815260206004820152602160248201527f5175616e746974792065786365656473207065722d77616c6c6574206c696d6960448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b600d5434906122a890600160801b90046001600160801b0316856146b4565b11156122f65760405162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768206d696e6572616c73000000000000000000000000006044820152606401610c9e565b6122ff8361337e565b5050600160095550565b606061231482612a6a565b6123865760405162461bcd60e51b815260206004820152602860248201527f224552433732314d657461646174613a20746f6b656e496420646f6573206e6f60448201527f74206578697374220000000000000000000000000000000000000000000000006064820152608401610c9e565b6014612391836134c9565b6040516020016123a29291906144b9565b6040516020818303038152906040529050919050565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526000917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c191848116919083169063c45527919060240160206040518083038186803b15801561243c57600080fd5b505afa158015612450573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124749190614326565b6001600160a01b0316141561248d576001915050610b8d565b6001600160a01b0380851660009081526004602090815260408083209387168352929052205460ff165b949350505050565b600260095414156125125760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c9e565b6002600955600854600160a01b900460ff16156125715760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600f54600e546125819190614688565b4210156125d05760405162461bcd60e51b815260206004820152600d60248201527f50726573616c65206f6e6c792e000000000000000000000000000000000000006044820152606401610c9e565b600c546001600160801b03168111156126515760405162461bcd60e51b815260206004820152602260248201527f5175616e746974792065786365656473205055424c49435f4d494e545f4c494d60448201527f49540000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b600d543490612669906001600160801b0316836146b4565b11156126b75760405162461bcd60e51b815260206004820152601360248201527f4e6f7420656e6f756768206d696e6572616c73000000000000000000000000006044820152606401610c9e565b60105460ff161561275f57600c54336000908152601260205260409020546001600160801b03909116906126eb9083614688565b111561275f5760405162461bcd60e51b815260206004820152602160248201527f5175616e746974792065786365656473207065722d77616c6c6574206c696d6960448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6127688161337e565b506001600955565b6008546001600160a01b031633146127ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b6001600160a01b0381166128465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c9e565b6110b381613003565b6011805461285c90614716565b80601f016020809104026020016040519081016040528092919081815260200182805461288890614716565b80156128d55780601f106128aa576101008083540402835291602001916128d5565b820191906000526020600020905b8154815290600101906020018083116128b857829003601f168201915b505050505081565b6008546001600160a01b031633146129375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b600b80546fffffffffffffffffffffffffffffffff19166001600160801b0392909216919091179055565b6008546001600160a01b031633146129bc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c9e565b8051611846906011906020840190613f11565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480612a3257506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b8d57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610b8d565b60025460009082108015610b8d575060006001600160a01b031660028381548110612a9757612a976147bc565b6000918252602090912001546001600160a01b0316141592915050565b6000818152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091558190612af68261184a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616612bad5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201527f49474e45520000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6001612bc0612bbb876135fb565b613678565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015612c0e573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000612c438284614688565b9392505050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001612cba929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401612ce7939291906145c8565b602060405180830381600087803b158015612d0157600080fd5b505af1158015612d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d3991906142ad565b506000838152600a6020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052612d95906001614688565b6000858152600a60205260409020556124b78482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000610b8d82604051806020016040528060008152506136c3565b600854600160a01b900460ff16612e495760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c9e565b600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600854600160a01b900460ff1615612f0b5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c9e565b600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612e943390565b612f6b3382613155565b612fdd5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c9e565b610df083838361374f565b610df083838360405180602001604052806000815250611da2565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600b5461307f90600160801b90046001600160801b031682614766565b6013555050565b816001600160a01b0316836001600160a01b031614156130e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c9e565b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600061316082612a6a565b6131d25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c9e565b60006131dd8361184a565b9050806001600160a01b0316846001600160a01b031614806132185750836001600160a01b031661320d84610c25565b6001600160a01b0316145b806124b757506124b781856123b8565b61323384848461374f565b61323f848484846138df565b6112705760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b6000806133446040805130606090811b6bffffffffffffffffffffffff199081166020808501919091523390921b166034830152825160288184030181526048830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060688401526084808401919091528351808403909101815260a4909201909252805191012090565b9050848114613357576000915050612c43565b6001600160a01b03831661336b8686613a71565b6001600160a01b03161495945050505050565b600b546002546001600160801b039091169061339a9083614688565b111561340e5760405162461bcd60e51b815260206004820152602160248201527f5075726368617365206578636565647320617661696c61626c6520737570706c60448201527f79000000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b60005b818110156134355761342233612dd5565b508061342d8161474b565b915050613411565b5060175460405163164746fd60e11b815260006004820152336024820152604481018390526001600160a01b0390911690632c8e8dfa90606401600060405180830381600087803b15801561348957600080fd5b505af115801561349d573d6000803e3d6000fd5b505033600090815260126020526040812080548594509092506134c1908490614688565b909155505050565b60608161350957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613533578061351d8161474b565b915061352c9050600a836146a0565b915061350d565b60008167ffffffffffffffff81111561354e5761354e6147d2565b6040519080825280601f01601f191660200182016040528015613578576020820181803683370190505b5090505b84156124b75761358d6001836146d3565b915061359a600a86614766565b6135a5906030614688565b60f81b8183815181106135ba576135ba6147bc565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506135f4600a866146a0565b945061357c565b6000604051806080016040528060438152602001614822604391398051602091820120835184830151604080870151805190860120905161365b950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061368360065490565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620161365b565b60006136ce83613a95565b90506136dd60008483856138df565b610b8d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b826001600160a01b03166137628261184a565b6001600160a01b0316146137de5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c9e565b6001600160a01b0382166138595760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b613864600082612ab4565b8160028281548110613878576138786147bc565b60009182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b60006001600160a01b0384163b15613a69576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061393c90339089908890889060040161458c565b602060405180830381600087803b15801561395657600080fd5b505af1925050508015613986575060408051601f3d908101601f1916820190925261398391810190614309565b60015b613a36573d8080156139b4576040519150601f19603f3d011682016040523d82523d6000602084013e6139b9565b606091505b508051613a2e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c9e565b805181602001fd5b6001600160e01b0319167f150b7a02000000000000000000000000000000000000000000000000000000001490506124b7565b5060016124b7565b6000806000613a808585613b7b565b91509150613a8d81613beb565b509392505050565b60006001600160a01b038216613aed5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c9e565b506002546002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4919050565b600080825160411415613bb25760208301516040840151606085015160001a613ba687828585613ddc565b94509450505050613be4565b825160401415613bdc5760208301516040840151613bd1868383613ec9565b935093505050613be4565b506000905060025b9250929050565b6000816004811115613bff57613bff6147a6565b1415613c085750565b6001816004811115613c1c57613c1c6147a6565b1415613c6a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610c9e565b6002816004811115613c7e57613c7e6147a6565b1415613ccc5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610c9e565b6003816004811115613ce057613ce06147a6565b1415613d545760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6004816004811115613d6857613d686147a6565b14156110b35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610c9e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e135750600090506003613ec0565b8460ff16601b14158015613e2b57508460ff16601c14155b15613e3c5750600090506004613ec0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613e90573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613eb957600060019250925050613ec0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613f0387828885613ddc565b935093505050935093915050565b828054613f1d90614716565b90600052602060002090601f016020900481019282613f3f5760008555613f85565b82601f10613f5857805160ff1916838001178555613f85565b82800160010185558215613f85579182015b82811115613f85578251825591602001919060010190613f6a565b50613f91929150613f95565b5090565b5b80821115613f915760008155600101613f96565b600067ffffffffffffffff80841115613fc557613fc56147d2565b604051601f8501601f19908116603f01168101908282118183101715613fed57613fed6147d2565b8160405280935085815286868601111561400657600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261403157600080fd5b612c4383833560208501613faa565b60006020828403121561405257600080fd5b8135612c43816147e8565b6000806040838503121561407057600080fd5b823561407b816147e8565b9150602083013561408b816147e8565b809150509250929050565b6000806000606084860312156140ab57600080fd5b83356140b6816147e8565b925060208401356140c6816147e8565b929592945050506040919091013590565b600080600080608085870312156140ed57600080fd5b84356140f8816147e8565b93506020850135614108816147e8565b925060408501359150606085013567ffffffffffffffff81111561412b57600080fd5b61413787828801614020565b91505092959194509250565b6000806040838503121561415657600080fd5b8235614161816147e8565b9150602083013561408b816147fd565b600080600080600060a0868803121561418957600080fd5b8535614194816147e8565b9450602086013567ffffffffffffffff8111156141b057600080fd5b6141bc88828901614020565b9450506040860135925060608601359150608086013560ff811681146141e157600080fd5b809150509295509295909350565b6000806040838503121561420257600080fd5b823561420d816147e8565b946020939093013593505050565b6000806020838503121561422e57600080fd5b823567ffffffffffffffff8082111561424657600080fd5b818501915085601f83011261425a57600080fd5b81358181111561426957600080fd5b8660208260051b850101111561427e57600080fd5b60209290920196919550909350505050565b6000602082840312156142a257600080fd5b8135612c43816147fd565b6000602082840312156142bf57600080fd5b8151612c43816147fd565b600080604083850312156142dd57600080fd5b50508035926020909101359150565b6000602082840312156142fe57600080fd5b8135612c438161480b565b60006020828403121561431b57600080fd5b8151612c438161480b565b60006020828403121561433857600080fd5b8151612c43816147e8565b60006020828403121561435557600080fd5b813567ffffffffffffffff81111561436c57600080fd5b8201601f8101841361437d57600080fd5b6124b784823560208401613faa565b60006020828403121561439e57600080fd5b81356001600160801b0381168114612c4357600080fd5b6000602082840312156143c757600080fd5b5035919050565b6000806000606084860312156143e357600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561440857600080fd5b61441486828701614020565b9150509250925092565b600081518084526144368160208601602086016146ea565b601f01601f19169290920160200192915050565b6000815161445c8185602086016146ea565b9290920192915050565b600082516144788184602087016146ea565b9190910192915050565b600083516144948184602088016146ea565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b600080845481600182811c9150808316806144d557607f831692505b60208084108214156144f557634e487b7160e01b86526022600452602486fd5b818015614509576001811461451a57614547565b60ff19861689528489019650614547565b60008b81526020902060005b8681101561453f5781548b820152908501908301614526565b505084890196505b505050505050614557818561444a565b95945050505050565b60006001600160a01b03808616835280851660208401525060606040830152614557606083018461441e565b60006001600160a01b038087168352808616602084015250836040830152608060608301526145be608083018461441e565b9695505050505050565b6001600160a01b0384168152826020820152606060408201526000614557606083018461441e565b6020808252825182820181905260009190848201906040850190845b818110156146315783516001600160a01b03168352928401929184019160010161460c565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561463157835183529284019291840191600101614659565b602081526000612c43602083018461441e565b6000821982111561469b5761469b61477a565b500190565b6000826146af576146af614790565b500490565b60008160001904831182151516156146ce576146ce61477a565b500290565b6000828210156146e5576146e561477a565b500390565b60005b838110156147055781810151838201526020016146ed565b838111156112705750506000910152565b600181811c9082168061472a57607f821691505b602082108114156117d357634e487b7160e01b600052602260045260246000fd5b600060001982141561475f5761475f61477a565b5060010190565b60008261477557614775614790565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110b357600080fd5b80151581146110b357600080fd5b6001600160e01b0319811681146110b357600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a2646970667358221220cb133cfa995dd7f8f2ddeb6b9216aa2c20f5d5bf9b7a00dc8a35d8cac203957e64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c0aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000002868747470733a2f2f6d696e742e74656464796265617273717561642e696f2f6d657461646174612f000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _initialURI (string): https://mint.teddybearsquad.io/metadata/
Arg [1] : _keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [2] : _vrfCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [3] : _linkToken (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [4] : _linkFee (uint256): 2000000000000000000
Arg [5] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [2] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [3] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [4] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [5] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [7] : 68747470733a2f2f6d696e742e74656464796265617273717561642e696f2f6d
Arg [8] : 657461646174612f000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.