ERC-721
Overview
Max Total Supply
322 WAGMI
Holders
126
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 WAGMILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
WeApes
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 2 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol"; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract WeApes is ERC721A, Ownable, VRFConsumerBase { uint256 public price = 0.042 ether; uint256 constant _maxSupply = 6970; bytes32 internal keyHash; uint256 internal fee; bool public isSaleActive; uint256 public saleTimestamp; struct Prize { bool active; uint16 prizeId; address tokenAddress; uint256 tokenId; } struct Burning { uint16 prizeId; address owner; } uint16 public ticketsPerBurn; address[] public tickets; Prize public currentPrize; address tokensHolder; event Raffle(address winner, uint256 ticketsCount); constructor(address _tokensHolder, address _vrf, address _link, bytes32 _keyHash, uint256 _fee) ERC721A("WeApes", "WAGMI") VRFConsumerBase(_vrf, _link) { tokensHolder = _tokensHolder; keyHash = _keyHash; fee = _fee; } function maxSupply() external pure returns (uint256) { return _maxSupply - 1; } function ticketsOfOwner(address user) public view returns (uint256) { uint256 count = 0; for (uint256 i = 0; i < tickets.length; i++) { if (tickets[i] == user) { count++; } } return count * ticketsPerBurn + balanceOf(user); } function allTokensOfOwner(address user) public view returns (uint256[] memory) { uint256[] memory allTokens = new uint256[](balanceOf(user)); for (uint16 i = 0; i < allTokens.length; i++) { allTokens[i] = tokenOfOwnerByIndex(user, i); } return allTokens; } function totalTickets() public view returns (uint256) { return liveSupply() + tickets.length * ticketsPerBurn; } function liveSupply() public view returns (uint256) { return currentIndex - balanceOf(address(this)); } function whitelistMint(bytes memory signature, uint16 whitelistId, uint256 amount, uint8 free) public payable { require(isSaleActive, "Sale is not active yet"); address minter = _msgSender(); require(tx.origin == minter, "Contracts not allowed"); require(currentIndex + amount < _maxSupply, "Sold out"); require(amount <= 10, "Maximum per tx exceeded"); require(free == 0 || amount == 1, "Maximum per tx exceeded"); require(free == 1 || price * amount == msg.value, "You must send enough eth"); require(_numberMinted(minter) + amount < 11, "You can't mint that amount during presale"); bytes32 messageHash = keccak256(abi.encodePacked("wagmi", msg.sender, whitelistId, free)); bytes32 digest = ECDSA.toEthSignedMessageHash(messageHash); address signer = ECDSA.recover(digest, signature); require(signer == owner(), "Invalid signature"); _safeMint(minter, amount); } function mint(uint256 amount) public payable { require(isSaleActive && saleTimestamp < block.timestamp, "Sale is not active yet"); address minter = _msgSender(); require(currentIndex + amount < _maxSupply, "Sold out"); require(tx.origin == minter, "Contracts not allowed"); require(price * amount <= msg.value, "You must send enough eth"); require(amount <= 10, "Maximum per tx exceeded"); _mint(minter, amount, '', false); } function burnForTickets(uint256 tokenId) public { require(currentPrize.active, "Raffle not in progress"); burn(tokenId); tickets.push(msg.sender); } function setTokensHolder(address _t) public onlyOwner { tokensHolder = _t; } function startRaffle(uint16 _ticketsPerBurn, address tokenAddress, uint256 tokenId) public onlyOwner { require(!currentPrize.active, "Raffle in progress"); IERC721 tokenContract = IERC721(tokenAddress); require(tokenContract.ownerOf(tokenId) == tokensHolder, "Must have token"); require(tokenContract.isApprovedForAll(tokensHolder, address(this)), "Must have approval"); ticketsPerBurn = _ticketsPerBurn; currentPrize = Prize(true, currentPrize.prizeId + 1, tokenAddress, tokenId); delete tickets; } function cancelRaffle() public onlyOwner { require(currentPrize.active, "Raffle in progress"); currentPrize.active = false; } function pickAWinner() public onlyOwner { require(currentPrize.active, "No prize"); IERC721 tokenContract = IERC721(currentPrize.tokenAddress); require(tokenContract.ownerOf(currentPrize.tokenId) == tokensHolder, "Must have token"); require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK"); requestRandomness(keyHash, fee); } function toggleSaleStatus(uint256 m) public onlyOwner { isSaleActive = !isSaleActive; if (isSaleActive) { saleTimestamp = block.timestamp + m * 1 minutes; } } function setPrice(uint256 _p) public onlyOwner { price = _p; } function withdraw() public onlyOwner { payable(msg.sender).transfer(address(this).balance); } function mintAsOwner(address to, uint8 amount) public onlyOwner { require(currentIndex + amount < _maxSupply, "Sold out"); _mint(to, amount, '', false); } function getTokenOwner(uint256 seed) public view returns (address) { while (true) { uint256 tokenId = seed; address o = ownerOf(tokenId); if (o != address(this)) { return o; } seed = (tokenId + 1) % currentIndex; } return address(0); } function getTicket(uint256 seed) public view returns (address) { return tickets[seed % tickets.length]; } function burn(uint256 tokenId) internal { transferFrom(msg.sender, address(this), tokenId); } function fulfillRandomness(bytes32, uint256 randomness) internal override { IERC721 tokenContract = IERC721(currentPrize.tokenAddress); uint256 seed = randomness % totalTickets(); uint256 supply = liveSupply(); address recipient = seed < supply ? getTokenOwner(seed) : getTicket(seed - supply); tokenContract.transferFrom(tokensHolder, recipient, currentPrize.tokenId); currentPrize.active = false; emit Raffle(recipient, totalTickets()); } function _baseURI() internal pure override returns (string memory) { return "ipfs://QmSSAjR6jGCBKwebGpGhye7gGMByWo1Pma6NFxst7GxEKo/"; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev 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 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 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 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 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 pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.0; import 'openzeppelin-solidity/contracts/token/ERC721/IERC721.sol'; import 'openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol'; import 'openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import 'openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import 'openzeppelin-solidity/contracts/utils/Address.sol'; import 'openzeppelin-solidity/contracts/utils/Context.sol'; import 'openzeppelin-solidity/contracts/utils/Strings.sol'; import 'openzeppelin-solidity/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), 'ERC721A: global index out of bounds'); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), 'ERC721A: owner index out of bounds'); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert('ERC721A: unable to get token of owner by index'); } /** * @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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), 'ERC721A: balance query for the zero address'); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require(owner != address(0), 'ERC721A: number minted query for the zero address'); return uint256(_addressData[owner].numberMinted); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { require(_exists(tokenId), 'ERC721A: owner query for nonexistent token'); unchecked { for (uint256 curr = tokenId; curr >= 0; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } revert('ERC721A: unable to determine the owner of token'); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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 override { address owner = ERC721A.ownerOf(tokenId); require(to != owner, 'ERC721A: approval to current owner'); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), 'ERC721A: approve caller is not owner nor approved for all' ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), 'ERC721A: approved query for nonexistent token'); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), 'ERC721A: approve to caller'); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), 'ERC721A: 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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < currentIndex; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = currentIndex; require(to != address(0), 'ERC721A: mint to the zero address'); require(quantity != 0, 'ERC721A: quantity must be greater than 0'); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if currentIndex + quantity > 1.56e77 (2**256) - 1 unchecked { _addressData[to].balance += uint128(quantity); _addressData[to].numberMinted += uint128(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe) { require( _checkOnERC721Received(address(0), to, updatedIndex, _data), 'ERC721A: transfer to non ERC721Receiver implementer' ); } updatedIndex++; } currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require(isApprovedOrOwner, 'ERC721A: transfer caller is not owner nor approved'); require(prevOwnership.addr == from, 'ERC721A: transfer from incorrect owner'); require(to != address(0), 'ERC721A: transfer to the zero address'); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert('ERC721A: transfer to non ERC721Receiver implementer'); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// 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": 2 }, "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":"address","name":"_tokensHolder","type":"address"},{"internalType":"address","name":"_vrf","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"bytes32","name":"_keyHash","type":"bytes32"},{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"ticketsCount","type":"uint256"}],"name":"Raffle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"allTokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnForTickets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentPrize","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint16","name":"prizeId","type":"uint16"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"getTicket","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"getTokenOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liveSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"mintAsOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pickAWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_p","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_t","type":"address"}],"name":"setTokensHolder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_ticketsPerBurn","type":"uint16"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"startRaffle","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":"","type":"uint256"}],"name":"tickets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"ticketsOfOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ticketsPerBurn","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"m","type":"uint256"}],"name":"toggleSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTickets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint16","name":"whitelistId","type":"uint16"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"free","type":"uint8"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052669536c7089100006009553480156200001c57600080fd5b5060405162003843380380620038438339810160408190526200003f9162000223565b604080518082018252600681526557654170657360d01b6020808301918252835180850190945260058452645741474d4960d81b908401528151879387939290916200008e9160019162000160565b508051620000a490600290602084019062000160565b505050620000c1620000bb6200010a60201b60201c565b6200010e565b606091821b6001600160601b031990811660a052911b16608052601280546001600160a01b0319166001600160a01b039690961695909517909455600a555050600b55620002bd565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200016e9062000280565b90600052602060002090601f016020900481019282620001925760008555620001dd565b82601f10620001ad57805160ff1916838001178555620001dd565b82800160010185558215620001dd579182015b82811115620001dd578251825591602001919060010190620001c0565b50620001eb929150620001ef565b5090565b5b80821115620001eb5760008155600101620001f0565b80516001600160a01b03811681146200021e57600080fd5b919050565b600080600080600060a086880312156200023c57600080fd5b620002478662000206565b9450620002576020870162000206565b9350620002676040870162000206565b6060870151608090970151959894975095949392505050565b600181811c908216806200029557607f821691505b60208210811415620002b757634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c60a05160601c61354c620002f7600039600081816115520152612791015260008181611b5a0152612762015261354c6000f3fe6080604052600436106101f75760003560e01c806301ffc9a7146101fc57806306fdde0314610231578063081812fc14610253578063095ea7b31461028057806318160ddd146102a25780631feab8ab146102c157806323b872dd146102d457806324726d1a146102f45780632f745c59146103145780633c99e2e9146103345780633ccfd60b1461036157806342842e0e1461037657806345228b46146103965780634f6ccce7146103b657806350b44712146103d6578063564566a8146103f65780636352211e14610410578063705332501461043057806370a0823114610445578063715018a6146104655780637dc379fa1461047a5780638b2fda461461049a5780638da5cb5b146104ba57806391b7f5ed146104cf57806394985ddd146104ef57806395d89b411461050f578063a035b1fe14610524578063a0712d681461053a578063a078c1a01461054d578063a22cb4651461056d578063a5cd761f1461058d578063b88d4fde146105ad578063c42b42a0146105cd578063c49e534d1461063a578063c782259814610668578063c87b56dd1461067e578063cb4f1c181461069e578063cd4faf83146106b3578063d5abeb01146106d3578063dd11247e146106e8578063e56456f1146106fd578063e934533a14610712578063e985e9c514610732578063f2fde38b1461077b575b600080fd5b34801561020857600080fd5b5061021c610217366004612efd565b61079b565b60405190151581526020015b60405180910390f35b34801561023d57600080fd5b50610246610808565b604051610228919061310e565b34801561025f57600080fd5b5061027361026e366004612fbc565b61089a565b6040516102289190613049565b34801561028c57600080fd5b506102a061029b366004612e5d565b61092a565b005b3480156102ae57600080fd5b506000545b604051908152602001610228565b6102a06102cf366004612f37565b610a3e565b3480156102e057600080fd5b506102a06102ef366004612d83565b610cd3565b34801561030057600080fd5b506102a061030f366004612fbc565b610cde565b34801561032057600080fd5b506102b361032f366004612e5d565b610d77565b34801561034057600080fd5b5061035461034f366004612d10565b610ed3565b60405161022891906130ca565b34801561036d57600080fd5b506102a0610f7b565b34801561038257600080fd5b506102a0610391366004612d83565b610fd9565b3480156103a257600080fd5b506102a06103b1366004612e89565b610ff4565b3480156103c257600080fd5b506102b36103d1366004612fbc565b611077565b3480156103e257600080fd5b506102736103f1366004612fbc565b6110d9565b34801561040257600080fd5b50600c5461021c9060ff1681565b34801561041c57600080fd5b5061027361042b366004612fbc565b611103565b34801561043c57600080fd5b506102a0611115565b34801561045157600080fd5b506102b3610460366004612d10565b611172565b34801561047157600080fd5b506102a0611203565b34801561048657600080fd5b50610273610495366004612fbc565b61123e565b3480156104a657600080fd5b506102a06104b5366004612f9e565b61127b565b3480156104c657600080fd5b50610273611504565b3480156104db57600080fd5b506102a06104ea366004612fbc565b611513565b3480156104fb57600080fd5b506102a061050a366004612edb565b611547565b34801561051b57600080fd5b506102466115c9565b34801561053057600080fd5b506102b360095481565b6102a0610548366004612fbc565b6115d8565b34801561055957600080fd5b506102a0610568366004612fbc565b6116ca565b34801561057957600080fd5b506102a0610588366004612e2f565b61172f565b34801561059957600080fd5b506102736105a8366004612fbc565b6117f1565b3480156105b957600080fd5b506102a06105c8366004612dc4565b61183a565b3480156105d957600080fd5b506010546011546106079160ff811691610100820461ffff1691630100000090046001600160a01b03169084565b60408051941515855261ffff90931660208501526001600160a01b03909116918301919091526060820152608001610228565b34801561064657600080fd5b50600e546106559061ffff1681565b60405161ffff9091168152602001610228565b34801561067457600080fd5b506102b3600d5481565b34801561068a57600080fd5b50610246610699366004612fbc565b61186d565b3480156106aa57600080fd5b506102b361193b565b3480156106bf57600080fd5b506102b36106ce366004612d10565b611958565b3480156106df57600080fd5b506102b36119e4565b3480156106f457600080fd5b506102b36119f3565b34801561070957600080fd5b506102a0611a1e565b34801561071e57600080fd5b506102a061072d366004612d10565b611c2d565b34801561073e57600080fd5b5061021c61074d366004612d4a565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561078757600080fd5b506102a0610796366004612d10565b611c7e565b60006001600160e01b031982166380ac58cd60e01b14806107cc57506001600160e01b03198216635b5e139f60e01b145b806107e757506001600160e01b0319821663780e9d6360e01b145b8061080257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546108179061338d565b80601f01602080910402602001604051908101604052809291908181526020018280546108439061338d565b80156108905780601f1061086557610100808354040283529160200191610890565b820191906000526020600020905b81548152906001019060200180831161087357829003601f168201915b5050505050905090565b60006108a7826000541190565b61090e5760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061093582611103565b9050806001600160a01b0316836001600160a01b031614156109a45760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610905565b336001600160a01b03821614806109c057506109c0813361074d565b610a2e5760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f6044820152781ddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b603a1b6064820152608401610905565b610a39838383611d1b565b505050565b600c5460ff16610a605760405162461bcd60e51b81526004016109059061314a565b33328114610a805760405162461bcd60e51b8152600401610905906131db565b611b3a83600054610a9191906132ff565b10610aae5760405162461bcd60e51b81526004016109059061326d565b600a831115610acf5760405162461bcd60e51b81526004016109059061320a565b60ff82161580610adf5750826001145b610afb5760405162461bcd60e51b81526004016109059061320a565b8160ff1660011480610b1957503483600954610b17919061332b565b145b610b355760405162461bcd60e51b81526004016109059061323b565b600b83610b4183611d77565b610b4b91906132ff565b10610baa5760405162461bcd60e51b815260206004820152602960248201527f596f752063616e2774206d696e74207468617420616d6f756e7420647572696e604482015268672070726573616c6560b81b6064820152608401610905565b60408051647761676d6960d81b6020808301919091523360601b6001600160601b031916602583015260f087901b6001600160f01b031916603983015260f885901b6001600160f81b031916603b8301528251601c818403018152603c830184528051908201207b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b605c840152607880840182905284518085039091018152609890930190935281519101206000610c618289611e15565b9050610c6b611504565b6001600160a01b0316816001600160a01b031614610cbf5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610905565b610cc98487611e39565b5050505050505050565b610a39838383611e53565b60105460ff16610d295760405162461bcd60e51b8152602060048201526016602482015275526166666c65206e6f7420696e2070726f677265737360501b6044820152606401610905565b610d3281612124565b50600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b03191633179055565b6000610d8283611172565b8210610ddb5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610905565b600080549080805b83811015610e73576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610e3557805192505b876001600160a01b0316836001600160a01b03161415610e6a5786841415610e635750935061080292505050565b6001909301925b50600101610de3565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610905565b60606000610ee083611172565b6001600160401b03811115610ef757610ef7613471565b604051908082528060200260200182016040528015610f20578160200160208202803683370190505b50905060005b81518161ffff161015610f7457610f41848261ffff16610d77565b828261ffff1681518110610f5757610f5761345b565b602090810291909101015280610f6c816133c8565b915050610f26565b5092915050565b33610f84611504565b6001600160a01b031614610faa5760405162461bcd60e51b8152600401610905906131a6565b60405133904780156108fc02916000818181858888f19350505050158015610fd6573d6000803e3d6000fd5b50565b610a398383836040518060200160405280600081525061183a565b33610ffd611504565b6001600160a01b0316146110235760405162461bcd60e51b8152600401610905906131a6565b611b3a8160ff1660005461103791906132ff565b106110545760405162461bcd60e51b81526004016109059061326d565b611073828260ff1660405180602001604052806000815250600061212f565b5050565b6000805482106110d55760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610905565b5090565b600f81815481106110e957600080fd5b6000918252602090912001546001600160a01b0316905081565b600061110e826122df565b5192915050565b3361111e611504565b6001600160a01b0316146111445760405162461bcd60e51b8152600401610905906131a6565b60105460ff166111665760405162461bcd60e51b81526004016109059061317a565b6010805460ff19169055565b60006001600160a01b0382166111de5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610905565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b3361120c611504565b6001600160a01b0316146112325760405162461bcd60e51b8152600401610905906131a6565b61123c60006123b5565b565b600f8054600091906112509084613405565b815481106112605761126061345b565b6000918252602090912001546001600160a01b031692915050565b33611284611504565b6001600160a01b0316146112aa5760405162461bcd60e51b8152600401610905906131a6565b60105460ff16156112cd5760405162461bcd60e51b81526004016109059061317a565b6012546040516331a9108f60e11b81526004810183905283916001600160a01b039081169190831690636352211e9060240160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190612d2d565b6001600160a01b0316146113755760405162461bcd60e51b815260040161090590613121565b60125460405163e985e9c560e01b81526001600160a01b0391821660048201523060248201529082169063e985e9c59060440160206040518083038186803b1580156113c057600080fd5b505afa1580156113d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f89190612ebe565b6114395760405162461bcd60e51b8152602060048201526012602482015271135d5cdd081a185d9948185c1c1c9bdd985b60721b6044820152606401610905565b600e805461ffff191661ffff86811691909117909155604080516080810190915260018082526010549192602084019261147c92610100909104909116906132e2565b61ffff90811682526001600160a01b03808716602080850191909152604093840187905284516010805492870151958701519093166301000000026301000000600160b81b0319959094166101000262ffff00199115159190911662ffffff19909216919091171792909216179055606001516011556114fe600f6000612c2e565b50505050565b6007546001600160a01b031690565b3361151c611504565b6001600160a01b0316146115425760405162461bcd60e51b8152600401610905906131a6565b600955565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115bf5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610905565b6110738282612407565b6060600280546108179061338d565b600c5460ff1680156115eb575042600d54105b6116075760405162461bcd60e51b81526004016109059061314a565b6000543390611b3a9061161b9084906132ff565b106116385760405162461bcd60e51b81526004016109059061326d565b326001600160a01b038216146116605760405162461bcd60e51b8152600401610905906131db565b348260095461166f919061332b565b111561168d5760405162461bcd60e51b81526004016109059061323b565b600a8211156116ae5760405162461bcd60e51b81526004016109059061320a565b611073818360405180602001604052806000815250600061212f565b336116d3611504565b6001600160a01b0316146116f95760405162461bcd60e51b8152600401610905906131a6565b600c805460ff19811660ff918216159081179092551615610fd65761171f81603c61332b565b61172990426132ff565b600d5550565b6001600160a01b0382163314156117855760405162461bcd60e51b815260206004820152601a60248201527922a9219b9918a09d1030b8383937bb32903a379031b0b63632b960311b6044820152606401610905565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005b81600061180082611103565b90506001600160a01b0381163014611819579392505050565b6000546118278360016132ff565b6118319190613405565b935050506117f4565b611845848484611e53565b61185184848484612533565b6114fe5760405162461bcd60e51b81526004016109059061328f565b606061187a826000541190565b6118de5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610905565b60006118e8612641565b90508051600014156119095760405180602001604052806000815250611934565b8061191384612661565b60405160200161192492919061301a565b6040516020818303038152906040525b9392505050565b600061194630611172565b600054611953919061334a565b905090565b600080805b600f548110156119bf57836001600160a01b0316600f82815481106119845761198461345b565b6000918252602090912001546001600160a01b031614156119ad57816119a9816133ea565b9250505b806119b7816133ea565b91505061195d565b506119c983611172565b600e546119da9061ffff168361332b565b61193491906132ff565b60006119536001611b3a61334a565b600e54600f54600091611a0c9161ffff9091169061332b565b611a1461193b565b61195391906132ff565b33611a27611504565b6001600160a01b031614611a4d5760405162461bcd60e51b8152600401610905906131a6565b60105460ff16611a8a5760405162461bcd60e51b81526020600482015260086024820152674e6f207072697a6560c01b6044820152606401610905565b6010546012546011546040516331a9108f60e11b8152600481019190915263010000009092046001600160a01b03908116929116908290636352211e9060240160206040518083038186803b158015611ae257600080fd5b505afa158015611af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1a9190612d2d565b6001600160a01b031614611b405760405162461bcd60e51b815260040161090590613121565b600b546040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611b8f903090600401613049565b60206040518083038186803b158015611ba757600080fd5b505afa158015611bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdf9190612fd5565b1015611c1f5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610905565b611073600a54600b5461275e565b33611c36611504565b6001600160a01b031614611c5c5760405162461bcd60e51b8152600401610905906131a6565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b33611c87611504565b6001600160a01b031614611cad5760405162461bcd60e51b8152600401610905906131a6565b6001600160a01b038116611d125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610905565b610fd6816123b5565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006001600160a01b038216611de95760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527020746865207a65726f206164647265737360781b6064820152608401610905565b506001600160a01b0316600090815260046020526040902054600160801b90046001600160801b031690565b6000806000611e2485856128e9565b91509150611e3181612959565b509392505050565b611073828260405180602001604052806000815250612b0f565b6000611e5e826122df565b80519091506000906001600160a01b0316336001600160a01b03161480611e95575033611e8a8461089a565b6001600160a01b0316145b80611ea757508151611ea7903361074d565b905080611f115760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610905565b846001600160a01b031682600001516001600160a01b031614611f855760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610905565b6001600160a01b038416611fe95760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610905565b611ff96000848460000151611d1b565b6001600160a01b03858116600090815260046020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b426001600160401b0316021790559086018083529120549091166120ec576120a0816000541190565b156120ec57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03166000805160206134c183398151915260405160405180910390a45b5050505050565b610fd6333083610cd3565b6000546001600160a01b0385166121925760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610905565b836121f05760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b6064820152608401610905565b6001600160a01b03851660008181526004602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b858110156122d65760405182906001600160a01b038916906000906000805160206134c1833981519152908290a483156122ca576122ae6000888488612533565b6122ca5760405162461bcd60e51b81526004016109059061328f565b6001918201910161226d565b5060005561211d565b60408051808201909152600080825260208201526122fe826000541190565b61235d5760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610905565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b031691830191909152156123ab579392505050565b506000190161235f565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b601054630100000090046001600160a01b031660006124246119f3565b61242e9084613405565b9050600061243a61193b565b9050600081831061245757612452610495838561334a565b612460565b612460836117f1565b6012546011546040516323b872dd60e01b81526001600160a01b039283166004820152828416602482015260448101919091529192508516906323b872dd90606401600060405180830381600087803b1580156124bc57600080fd5b505af11580156124d0573d6000803e3d6000fd5b50506010805460ff19169055507f234857b340c5dd597c309f3e409e97ca4020bc2b258b0fcce00cd3d6c5ced1009050816125096119f3565b604080516001600160a01b03909316835260208301919091520160405180910390a1505050505050565b60006001600160a01b0384163b1561263557604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061257790339089908890889060040161305d565b602060405180830381600087803b15801561259157600080fd5b505af19250505080156125c1575060408051601f3d908101601f191682019092526125be91810190612f1a565b60015b61261b573d8080156125ef576040519150601f19603f3d011682016040523d82523d6000602084013e6125f4565b606091505b5080516126135760405162461bcd60e51b81526004016109059061328f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612639565b5060015b949350505050565b60606040518060600160405280603681526020016134e160369139905090565b6060816126855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126af5780612699816133ea565b91506126a89050600a83613317565b9150612689565b6000816001600160401b038111156126c9576126c9613471565b6040519080825280601f01601f1916602001820160405280156126f3576020820181803683370190505b5090505b84156126395761270860018361334a565b9150612715600a86613405565b6127209060306132ff565b60f81b8183815181106127355761273561345b565b60200101906001600160f81b031916908160001a905350612757600a86613317565b94506126f7565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f0000000000000000000000000000000000000000000000000000000000000000848660006040516020016127ce929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016127fb9392919061309a565b602060405180830381600087803b15801561281557600080fd5b505af1158015612829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284d9190612ebe565b50600083815260086020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526128a99060016132ff565b6000858152600860205260409020556126398482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000808251604114156129205760208301516040840151606085015160001a61291487828585612b1c565b94509450505050612952565b82516040141561294a576020830151604084015161293f868383612bff565b935093505050612952565b506000905060025b9250929050565b600081600481111561296d5761296d613445565b14156129765750565b600181600481111561298a5761298a613445565b14156129d35760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610905565b60028160048111156129e7576129e7613445565b1415612a355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610905565b6003816004811115612a4957612a49613445565b1415612aa25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610905565b6004816004811115612ab657612ab6613445565b1415610fd65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610905565b610a39838383600161212f565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612b495750600090506003612bf6565b8460ff16601b14158015612b6157508460ff16601c14155b15612b725750600090506004612bf6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612bc6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612bef57600060019250925050612bf6565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612c2087828885612b1c565b935093505050935093915050565b5080546000825590600052602060002090810190610fd691905b808211156110d55760008155600101612c48565b600082601f830112612c6d57600080fd5b81356001600160401b0380821115612c8757612c87613471565b604051601f8301601f19908116603f01168101908282118183101715612caf57612caf613471565b81604052838152866020858801011115612cc857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803561ffff81168114612cfa57600080fd5b919050565b803560ff81168114612cfa57600080fd5b600060208284031215612d2257600080fd5b813561193481613487565b600060208284031215612d3f57600080fd5b815161193481613487565b60008060408385031215612d5d57600080fd5b8235612d6881613487565b91506020830135612d7881613487565b809150509250929050565b600080600060608486031215612d9857600080fd5b8335612da381613487565b92506020840135612db381613487565b929592945050506040919091013590565b60008060008060808587031215612dda57600080fd5b8435612de581613487565b93506020850135612df581613487565b92506040850135915060608501356001600160401b03811115612e1757600080fd5b612e2387828801612c5c565b91505092959194509250565b60008060408385031215612e4257600080fd5b8235612e4d81613487565b91506020830135612d788161349c565b60008060408385031215612e7057600080fd5b8235612e7b81613487565b946020939093013593505050565b60008060408385031215612e9c57600080fd5b8235612ea781613487565b9150612eb560208401612cff565b90509250929050565b600060208284031215612ed057600080fd5b81516119348161349c565b60008060408385031215612eee57600080fd5b50508035926020909101359150565b600060208284031215612f0f57600080fd5b8135611934816134aa565b600060208284031215612f2c57600080fd5b8151611934816134aa565b60008060008060808587031215612f4d57600080fd5b84356001600160401b03811115612f6357600080fd5b612f6f87828801612c5c565b945050612f7e60208601612ce8565b925060408501359150612f9360608601612cff565b905092959194509250565b600080600060608486031215612fb357600080fd5b612da384612ce8565b600060208284031215612fce57600080fd5b5035919050565b600060208284031215612fe757600080fd5b5051919050565b60008151808452613006816020860160208601613361565b601f01601f19169290920160200192915050565b6000835161302c818460208801613361565b835190830190613040818360208801613361565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061309090830184612fee565b9695505050505050565b60018060a01b03841681528260208201526060604082015260006130c16060830184612fee565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015613102578351835292840192918401916001016130e6565b50909695505050505050565b6020815260006119346020830184612fee565b6020808252600f908201526e26bab9ba103430bb32903a37b5b2b760891b604082015260600190565b60208082526016908201527514d85b19481a5cc81b9bdd081858dd1a5d99481e595d60521b604082015260600190565b602080825260129082015271526166666c6520696e2070726f677265737360701b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526015908201527410dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd959605a1b604082015260600190565b60208082526017908201527613585e1a5b5d5b481c195c881d1e08195e18d959591959604a1b604082015260600190565b6020808252601890820152770b2deea40daeae6e840e6cadcc840cadcdeeaced040cae8d60431b604082015260600190565b60208082526008908201526714dbdb19081bdd5d60c21b604082015260600190565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b600061ffff80831681851680830382111561304057613040613419565b6000821982111561331257613312613419565b500190565b6000826133265761332661342f565b500490565b600081600019048311821515161561334557613345613419565b500290565b60008282101561335c5761335c613419565b500390565b60005b8381101561337c578181015183820152602001613364565b838111156114fe5750506000910152565b600181811c908216806133a157607f821691505b602082108114156133c257634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156133e0576133e0613419565b6001019392505050565b60006000198214156133fe576133fe613419565b5060010190565b6000826134145761341461342f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fd657600080fd5b8015158114610fd657600080fd5b6001600160e01b031981168114610fd657600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef697066733a2f2f516d5353416a52366a4743424b7765624770476879653767474d4279576f31506d61364e46787374374778454b6f2fa26469706673582212202948cf1803a6c85debc246adf33330c496f8e82d4e62c791e56cee280ffd3efc64736f6c63430008070033000000000000000000000000a890909fe54385a4662a079cdd464317888bfd25000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
Deployed Bytecode
0x6080604052600436106101f75760003560e01c806301ffc9a7146101fc57806306fdde0314610231578063081812fc14610253578063095ea7b31461028057806318160ddd146102a25780631feab8ab146102c157806323b872dd146102d457806324726d1a146102f45780632f745c59146103145780633c99e2e9146103345780633ccfd60b1461036157806342842e0e1461037657806345228b46146103965780634f6ccce7146103b657806350b44712146103d6578063564566a8146103f65780636352211e14610410578063705332501461043057806370a0823114610445578063715018a6146104655780637dc379fa1461047a5780638b2fda461461049a5780638da5cb5b146104ba57806391b7f5ed146104cf57806394985ddd146104ef57806395d89b411461050f578063a035b1fe14610524578063a0712d681461053a578063a078c1a01461054d578063a22cb4651461056d578063a5cd761f1461058d578063b88d4fde146105ad578063c42b42a0146105cd578063c49e534d1461063a578063c782259814610668578063c87b56dd1461067e578063cb4f1c181461069e578063cd4faf83146106b3578063d5abeb01146106d3578063dd11247e146106e8578063e56456f1146106fd578063e934533a14610712578063e985e9c514610732578063f2fde38b1461077b575b600080fd5b34801561020857600080fd5b5061021c610217366004612efd565b61079b565b60405190151581526020015b60405180910390f35b34801561023d57600080fd5b50610246610808565b604051610228919061310e565b34801561025f57600080fd5b5061027361026e366004612fbc565b61089a565b6040516102289190613049565b34801561028c57600080fd5b506102a061029b366004612e5d565b61092a565b005b3480156102ae57600080fd5b506000545b604051908152602001610228565b6102a06102cf366004612f37565b610a3e565b3480156102e057600080fd5b506102a06102ef366004612d83565b610cd3565b34801561030057600080fd5b506102a061030f366004612fbc565b610cde565b34801561032057600080fd5b506102b361032f366004612e5d565b610d77565b34801561034057600080fd5b5061035461034f366004612d10565b610ed3565b60405161022891906130ca565b34801561036d57600080fd5b506102a0610f7b565b34801561038257600080fd5b506102a0610391366004612d83565b610fd9565b3480156103a257600080fd5b506102a06103b1366004612e89565b610ff4565b3480156103c257600080fd5b506102b36103d1366004612fbc565b611077565b3480156103e257600080fd5b506102736103f1366004612fbc565b6110d9565b34801561040257600080fd5b50600c5461021c9060ff1681565b34801561041c57600080fd5b5061027361042b366004612fbc565b611103565b34801561043c57600080fd5b506102a0611115565b34801561045157600080fd5b506102b3610460366004612d10565b611172565b34801561047157600080fd5b506102a0611203565b34801561048657600080fd5b50610273610495366004612fbc565b61123e565b3480156104a657600080fd5b506102a06104b5366004612f9e565b61127b565b3480156104c657600080fd5b50610273611504565b3480156104db57600080fd5b506102a06104ea366004612fbc565b611513565b3480156104fb57600080fd5b506102a061050a366004612edb565b611547565b34801561051b57600080fd5b506102466115c9565b34801561053057600080fd5b506102b360095481565b6102a0610548366004612fbc565b6115d8565b34801561055957600080fd5b506102a0610568366004612fbc565b6116ca565b34801561057957600080fd5b506102a0610588366004612e2f565b61172f565b34801561059957600080fd5b506102736105a8366004612fbc565b6117f1565b3480156105b957600080fd5b506102a06105c8366004612dc4565b61183a565b3480156105d957600080fd5b506010546011546106079160ff811691610100820461ffff1691630100000090046001600160a01b03169084565b60408051941515855261ffff90931660208501526001600160a01b03909116918301919091526060820152608001610228565b34801561064657600080fd5b50600e546106559061ffff1681565b60405161ffff9091168152602001610228565b34801561067457600080fd5b506102b3600d5481565b34801561068a57600080fd5b50610246610699366004612fbc565b61186d565b3480156106aa57600080fd5b506102b361193b565b3480156106bf57600080fd5b506102b36106ce366004612d10565b611958565b3480156106df57600080fd5b506102b36119e4565b3480156106f457600080fd5b506102b36119f3565b34801561070957600080fd5b506102a0611a1e565b34801561071e57600080fd5b506102a061072d366004612d10565b611c2d565b34801561073e57600080fd5b5061021c61074d366004612d4a565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561078757600080fd5b506102a0610796366004612d10565b611c7e565b60006001600160e01b031982166380ac58cd60e01b14806107cc57506001600160e01b03198216635b5e139f60e01b145b806107e757506001600160e01b0319821663780e9d6360e01b145b8061080257506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546108179061338d565b80601f01602080910402602001604051908101604052809291908181526020018280546108439061338d565b80156108905780601f1061086557610100808354040283529160200191610890565b820191906000526020600020905b81548152906001019060200180831161087357829003601f168201915b5050505050905090565b60006108a7826000541190565b61090e5760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b600061093582611103565b9050806001600160a01b0316836001600160a01b031614156109a45760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610905565b336001600160a01b03821614806109c057506109c0813361074d565b610a2e5760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f6044820152781ddb995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b603a1b6064820152608401610905565b610a39838383611d1b565b505050565b600c5460ff16610a605760405162461bcd60e51b81526004016109059061314a565b33328114610a805760405162461bcd60e51b8152600401610905906131db565b611b3a83600054610a9191906132ff565b10610aae5760405162461bcd60e51b81526004016109059061326d565b600a831115610acf5760405162461bcd60e51b81526004016109059061320a565b60ff82161580610adf5750826001145b610afb5760405162461bcd60e51b81526004016109059061320a565b8160ff1660011480610b1957503483600954610b17919061332b565b145b610b355760405162461bcd60e51b81526004016109059061323b565b600b83610b4183611d77565b610b4b91906132ff565b10610baa5760405162461bcd60e51b815260206004820152602960248201527f596f752063616e2774206d696e74207468617420616d6f756e7420647572696e604482015268672070726573616c6560b81b6064820152608401610905565b60408051647761676d6960d81b6020808301919091523360601b6001600160601b031916602583015260f087901b6001600160f01b031916603983015260f885901b6001600160f81b031916603b8301528251601c818403018152603c830184528051908201207b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b605c840152607880840182905284518085039091018152609890930190935281519101206000610c618289611e15565b9050610c6b611504565b6001600160a01b0316816001600160a01b031614610cbf5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610905565b610cc98487611e39565b5050505050505050565b610a39838383611e53565b60105460ff16610d295760405162461bcd60e51b8152602060048201526016602482015275526166666c65206e6f7420696e2070726f677265737360501b6044820152606401610905565b610d3281612124565b50600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8020180546001600160a01b03191633179055565b6000610d8283611172565b8210610ddb5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610905565b600080549080805b83811015610e73576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215610e3557805192505b876001600160a01b0316836001600160a01b03161415610e6a5786841415610e635750935061080292505050565b6001909301925b50600101610de3565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610905565b60606000610ee083611172565b6001600160401b03811115610ef757610ef7613471565b604051908082528060200260200182016040528015610f20578160200160208202803683370190505b50905060005b81518161ffff161015610f7457610f41848261ffff16610d77565b828261ffff1681518110610f5757610f5761345b565b602090810291909101015280610f6c816133c8565b915050610f26565b5092915050565b33610f84611504565b6001600160a01b031614610faa5760405162461bcd60e51b8152600401610905906131a6565b60405133904780156108fc02916000818181858888f19350505050158015610fd6573d6000803e3d6000fd5b50565b610a398383836040518060200160405280600081525061183a565b33610ffd611504565b6001600160a01b0316146110235760405162461bcd60e51b8152600401610905906131a6565b611b3a8160ff1660005461103791906132ff565b106110545760405162461bcd60e51b81526004016109059061326d565b611073828260ff1660405180602001604052806000815250600061212f565b5050565b6000805482106110d55760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610905565b5090565b600f81815481106110e957600080fd5b6000918252602090912001546001600160a01b0316905081565b600061110e826122df565b5192915050565b3361111e611504565b6001600160a01b0316146111445760405162461bcd60e51b8152600401610905906131a6565b60105460ff166111665760405162461bcd60e51b81526004016109059061317a565b6010805460ff19169055565b60006001600160a01b0382166111de5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610905565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b3361120c611504565b6001600160a01b0316146112325760405162461bcd60e51b8152600401610905906131a6565b61123c60006123b5565b565b600f8054600091906112509084613405565b815481106112605761126061345b565b6000918252602090912001546001600160a01b031692915050565b33611284611504565b6001600160a01b0316146112aa5760405162461bcd60e51b8152600401610905906131a6565b60105460ff16156112cd5760405162461bcd60e51b81526004016109059061317a565b6012546040516331a9108f60e11b81526004810183905283916001600160a01b039081169190831690636352211e9060240160206040518083038186803b15801561131757600080fd5b505afa15801561132b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134f9190612d2d565b6001600160a01b0316146113755760405162461bcd60e51b815260040161090590613121565b60125460405163e985e9c560e01b81526001600160a01b0391821660048201523060248201529082169063e985e9c59060440160206040518083038186803b1580156113c057600080fd5b505afa1580156113d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f89190612ebe565b6114395760405162461bcd60e51b8152602060048201526012602482015271135d5cdd081a185d9948185c1c1c9bdd985b60721b6044820152606401610905565b600e805461ffff191661ffff86811691909117909155604080516080810190915260018082526010549192602084019261147c92610100909104909116906132e2565b61ffff90811682526001600160a01b03808716602080850191909152604093840187905284516010805492870151958701519093166301000000026301000000600160b81b0319959094166101000262ffff00199115159190911662ffffff19909216919091171792909216179055606001516011556114fe600f6000612c2e565b50505050565b6007546001600160a01b031690565b3361151c611504565b6001600160a01b0316146115425760405162461bcd60e51b8152600401610905906131a6565b600955565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795216146115bf5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c006044820152606401610905565b6110738282612407565b6060600280546108179061338d565b600c5460ff1680156115eb575042600d54105b6116075760405162461bcd60e51b81526004016109059061314a565b6000543390611b3a9061161b9084906132ff565b106116385760405162461bcd60e51b81526004016109059061326d565b326001600160a01b038216146116605760405162461bcd60e51b8152600401610905906131db565b348260095461166f919061332b565b111561168d5760405162461bcd60e51b81526004016109059061323b565b600a8211156116ae5760405162461bcd60e51b81526004016109059061320a565b611073818360405180602001604052806000815250600061212f565b336116d3611504565b6001600160a01b0316146116f95760405162461bcd60e51b8152600401610905906131a6565b600c805460ff19811660ff918216159081179092551615610fd65761171f81603c61332b565b61172990426132ff565b600d5550565b6001600160a01b0382163314156117855760405162461bcd60e51b815260206004820152601a60248201527922a9219b9918a09d1030b8383937bb32903a379031b0b63632b960311b6044820152606401610905565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005b81600061180082611103565b90506001600160a01b0381163014611819579392505050565b6000546118278360016132ff565b6118319190613405565b935050506117f4565b611845848484611e53565b61185184848484612533565b6114fe5760405162461bcd60e51b81526004016109059061328f565b606061187a826000541190565b6118de5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610905565b60006118e8612641565b90508051600014156119095760405180602001604052806000815250611934565b8061191384612661565b60405160200161192492919061301a565b6040516020818303038152906040525b9392505050565b600061194630611172565b600054611953919061334a565b905090565b600080805b600f548110156119bf57836001600160a01b0316600f82815481106119845761198461345b565b6000918252602090912001546001600160a01b031614156119ad57816119a9816133ea565b9250505b806119b7816133ea565b91505061195d565b506119c983611172565b600e546119da9061ffff168361332b565b61193491906132ff565b60006119536001611b3a61334a565b600e54600f54600091611a0c9161ffff9091169061332b565b611a1461193b565b61195391906132ff565b33611a27611504565b6001600160a01b031614611a4d5760405162461bcd60e51b8152600401610905906131a6565b60105460ff16611a8a5760405162461bcd60e51b81526020600482015260086024820152674e6f207072697a6560c01b6044820152606401610905565b6010546012546011546040516331a9108f60e11b8152600481019190915263010000009092046001600160a01b03908116929116908290636352211e9060240160206040518083038186803b158015611ae257600080fd5b505afa158015611af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b1a9190612d2d565b6001600160a01b031614611b405760405162461bcd60e51b815260040161090590613121565b600b546040516370a0823160e01b81526001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16906370a0823190611b8f903090600401613049565b60206040518083038186803b158015611ba757600080fd5b505afa158015611bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdf9190612fd5565b1015611c1f5760405162461bcd60e51b815260206004820152600f60248201526e4e6f7420656e6f756768204c494e4b60881b6044820152606401610905565b611073600a54600b5461275e565b33611c36611504565b6001600160a01b031614611c5c5760405162461bcd60e51b8152600401610905906131a6565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b33611c87611504565b6001600160a01b031614611cad5760405162461bcd60e51b8152600401610905906131a6565b6001600160a01b038116611d125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610905565b610fd6816123b5565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006001600160a01b038216611de95760405162461bcd60e51b815260206004820152603160248201527f455243373231413a206e756d626572206d696e74656420717565727920666f7260448201527020746865207a65726f206164647265737360781b6064820152608401610905565b506001600160a01b0316600090815260046020526040902054600160801b90046001600160801b031690565b6000806000611e2485856128e9565b91509150611e3181612959565b509392505050565b611073828260405180602001604052806000815250612b0f565b6000611e5e826122df565b80519091506000906001600160a01b0316336001600160a01b03161480611e95575033611e8a8461089a565b6001600160a01b0316145b80611ea757508151611ea7903361074d565b905080611f115760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610905565b846001600160a01b031682600001516001600160a01b031614611f855760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610905565b6001600160a01b038416611fe95760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610905565b611ff96000848460000151611d1b565b6001600160a01b03858116600090815260046020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b426001600160401b0316021790559086018083529120549091166120ec576120a0816000541190565b156120ec57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03166000805160206134c183398151915260405160405180910390a45b5050505050565b610fd6333083610cd3565b6000546001600160a01b0385166121925760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610905565b836121f05760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b6064820152608401610905565b6001600160a01b03851660008181526004602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b858110156122d65760405182906001600160a01b038916906000906000805160206134c1833981519152908290a483156122ca576122ae6000888488612533565b6122ca5760405162461bcd60e51b81526004016109059061328f565b6001918201910161226d565b5060005561211d565b60408051808201909152600080825260208201526122fe826000541190565b61235d5760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b6064820152608401610905565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b031691830191909152156123ab579392505050565b506000190161235f565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b601054630100000090046001600160a01b031660006124246119f3565b61242e9084613405565b9050600061243a61193b565b9050600081831061245757612452610495838561334a565b612460565b612460836117f1565b6012546011546040516323b872dd60e01b81526001600160a01b039283166004820152828416602482015260448101919091529192508516906323b872dd90606401600060405180830381600087803b1580156124bc57600080fd5b505af11580156124d0573d6000803e3d6000fd5b50506010805460ff19169055507f234857b340c5dd597c309f3e409e97ca4020bc2b258b0fcce00cd3d6c5ced1009050816125096119f3565b604080516001600160a01b03909316835260208301919091520160405180910390a1505050505050565b60006001600160a01b0384163b1561263557604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061257790339089908890889060040161305d565b602060405180830381600087803b15801561259157600080fd5b505af19250505080156125c1575060408051601f3d908101601f191682019092526125be91810190612f1a565b60015b61261b573d8080156125ef576040519150601f19603f3d011682016040523d82523d6000602084013e6125f4565b606091505b5080516126135760405162461bcd60e51b81526004016109059061328f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612639565b5060015b949350505050565b60606040518060600160405280603681526020016134e160369139905090565b6060816126855750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126af5780612699816133ea565b91506126a89050600a83613317565b9150612689565b6000816001600160401b038111156126c9576126c9613471565b6040519080825280601f01601f1916602001820160405280156126f3576020820181803683370190505b5090505b84156126395761270860018361334a565b9150612715600a86613405565b6127209060306132ff565b60f81b8183815181106127355761273561345b565b60200101906001600160f81b031916908160001a905350612757600a86613317565b94506126f7565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952848660006040516020016127ce929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016127fb9392919061309a565b602060405180830381600087803b15801561281557600080fd5b505af1158015612829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284d9190612ebe565b50600083815260086020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a0909101909252815191830191909120938790529190526128a99060016132ff565b6000858152600860205260409020556126398482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b6000808251604114156129205760208301516040840151606085015160001a61291487828585612b1c565b94509450505050612952565b82516040141561294a576020830151604084015161293f868383612bff565b935093505050612952565b506000905060025b9250929050565b600081600481111561296d5761296d613445565b14156129765750565b600181600481111561298a5761298a613445565b14156129d35760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610905565b60028160048111156129e7576129e7613445565b1415612a355760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610905565b6003816004811115612a4957612a49613445565b1415612aa25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610905565b6004816004811115612ab657612ab6613445565b1415610fd65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610905565b610a39838383600161212f565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115612b495750600090506003612bf6565b8460ff16601b14158015612b6157508460ff16601c14155b15612b725750600090506004612bf6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612bc6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612bef57600060019250925050612bf6565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612c2087828885612b1c565b935093505050935093915050565b5080546000825590600052602060002090810190610fd691905b808211156110d55760008155600101612c48565b600082601f830112612c6d57600080fd5b81356001600160401b0380821115612c8757612c87613471565b604051601f8301601f19908116603f01168101908282118183101715612caf57612caf613471565b81604052838152866020858801011115612cc857600080fd5b836020870160208301376000602085830101528094505050505092915050565b803561ffff81168114612cfa57600080fd5b919050565b803560ff81168114612cfa57600080fd5b600060208284031215612d2257600080fd5b813561193481613487565b600060208284031215612d3f57600080fd5b815161193481613487565b60008060408385031215612d5d57600080fd5b8235612d6881613487565b91506020830135612d7881613487565b809150509250929050565b600080600060608486031215612d9857600080fd5b8335612da381613487565b92506020840135612db381613487565b929592945050506040919091013590565b60008060008060808587031215612dda57600080fd5b8435612de581613487565b93506020850135612df581613487565b92506040850135915060608501356001600160401b03811115612e1757600080fd5b612e2387828801612c5c565b91505092959194509250565b60008060408385031215612e4257600080fd5b8235612e4d81613487565b91506020830135612d788161349c565b60008060408385031215612e7057600080fd5b8235612e7b81613487565b946020939093013593505050565b60008060408385031215612e9c57600080fd5b8235612ea781613487565b9150612eb560208401612cff565b90509250929050565b600060208284031215612ed057600080fd5b81516119348161349c565b60008060408385031215612eee57600080fd5b50508035926020909101359150565b600060208284031215612f0f57600080fd5b8135611934816134aa565b600060208284031215612f2c57600080fd5b8151611934816134aa565b60008060008060808587031215612f4d57600080fd5b84356001600160401b03811115612f6357600080fd5b612f6f87828801612c5c565b945050612f7e60208601612ce8565b925060408501359150612f9360608601612cff565b905092959194509250565b600080600060608486031215612fb357600080fd5b612da384612ce8565b600060208284031215612fce57600080fd5b5035919050565b600060208284031215612fe757600080fd5b5051919050565b60008151808452613006816020860160208601613361565b601f01601f19169290920160200192915050565b6000835161302c818460208801613361565b835190830190613040818360208801613361565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061309090830184612fee565b9695505050505050565b60018060a01b03841681528260208201526060604082015260006130c16060830184612fee565b95945050505050565b6020808252825182820181905260009190848201906040850190845b81811015613102578351835292840192918401916001016130e6565b50909695505050505050565b6020815260006119346020830184612fee565b6020808252600f908201526e26bab9ba103430bb32903a37b5b2b760891b604082015260600190565b60208082526016908201527514d85b19481a5cc81b9bdd081858dd1a5d99481e595d60521b604082015260600190565b602080825260129082015271526166666c6520696e2070726f677265737360701b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526015908201527410dbdb9d1c9858dd1cc81b9bdd08185b1b1bddd959605a1b604082015260600190565b60208082526017908201527613585e1a5b5d5b481c195c881d1e08195e18d959591959604a1b604082015260600190565b6020808252601890820152770b2deea40daeae6e840e6cadcc840cadcdeeaced040cae8d60431b604082015260600190565b60208082526008908201526714dbdb19081bdd5d60c21b604082015260600190565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b600061ffff80831681851680830382111561304057613040613419565b6000821982111561331257613312613419565b500190565b6000826133265761332661342f565b500490565b600081600019048311821515161561334557613345613419565b500290565b60008282101561335c5761335c613419565b500390565b60005b8381101561337c578181015183820152602001613364565b838111156114fe5750506000910152565b600181811c908216806133a157607f821691505b602082108114156133c257634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156133e0576133e0613419565b6001019392505050565b60006000198214156133fe576133fe613419565b5060010190565b6000826134145761341461342f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fd657600080fd5b8015158114610fd657600080fd5b6001600160e01b031981168114610fd657600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef697066733a2f2f516d5353416a52366a4743424b7765624770476879653767474d4279576f31506d61364e46787374374778454b6f2fa26469706673582212202948cf1803a6c85debc246adf33330c496f8e82d4e62c791e56cee280ffd3efc64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a890909fe54385a4662a079cdd464317888bfd25000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
-----Decoded View---------------
Arg [0] : _tokensHolder (address): 0xA890909fE54385A4662a079CDD464317888bfD25
Arg [1] : _vrf (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [2] : _link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [3] : _keyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [4] : _fee (uint256): 2000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000a890909fe54385a4662a079cdd464317888bfd25
Arg [1] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [2] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [3] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [4] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.