Overview
Max Total Supply
188 FEARWOLF
Holders
83
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 FEARWOLFLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
FearWolf
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @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); } /** * @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; } /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers from ERC721 asset contracts. */ interface IERC721Receiver is IERC165 { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @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); } /** * @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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ 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. */ 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`. */ 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. */ 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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @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); } function toString(bytes32 value) internal pure returns (string memory) { uint8 i = 0; while(i < 32 && value[i] != 0) { i++; } bytes memory bytesArray = new bytes(i); for (i = 0; i < 32 && value[i] != 0; i++) { bytesArray[i] = value[i]; } return string(bytesArray); } /** * @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); } } /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via _msgSender() 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; } } /** * @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; } } /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Storage is ERC165 { /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId] || super.supportsInterface(interfaceId); } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165Storage, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _registerInterface(type(IERC721).interfaceId); _registerInterface(type(IERC721Metadata).interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override tokenExists(tokenId) returns (address) { return _owners[tokenId]; } /** * @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 tokenExists(tokenId) returns (string memory) { string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all"); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override tokenExists(tokenId) returns (address) { return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual tokenExists(tokenId) returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual tokenNotMinted(tokenId) { require(to != address(0), "ERC721: mint to the zero address"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual {} /** * @dev Modifier that checks that token exists. Reverts if token doesn't exist. */ modifier tokenExists(uint256 tokenId) { require(_exists(tokenId), "ERC721: query for nonexistent token"); _; } /** * @dev Modifier that checks that token is not minted (doesn't exist). Reverts if token exists. */ modifier tokenNotMinted(uint256 tokenId) { require(!_exists(tokenId), "ERC721: token already minted"); _; } } /** * @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); /** * @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); } /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; constructor() { _registerInterface(type(IERC721Enumerable).interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } } interface IMRC721 is IERC721 { function mint(address owner, uint256 tokenId) external; function burn(uint256 tokenId) external; function tokensOfOwner(address owner) external view returns(uint256[] memory); function totalSupply() external view returns (uint256); } interface IMRC721Metadata is IMRC721 { function mint(address to, uint256 id, bytes calldata data) external; function encodeParams(uint256 id) external view returns(bytes memory); function encodeParams(uint256[] calldata ids) external view returns(bytes memory); } /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; } /** * @dev Interface of a contract containing identifier for Root role. */ interface IRoleContainerRoot { /** * @dev Returns Root role identifier. */ function ROOT_ROLE() external view returns (bytes32); } /** * @dev Interface of a contract containing identifier for Admin role. */ interface IRoleContainerAdmin { /** * @dev Returns Admin role identifier. */ function ADMIN_ROLE() external view returns (bytes32); } /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, _msgSender())); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. */ abstract contract AccessControl is Context, ERC165Storage, IAccessControl, IRoleContainerAdmin { /** * @dev Root Admin role identifier. */ bytes32 public constant ROOT_ROLE = "Root"; /** * @dev Admin role identifier. */ bytes32 public constant ADMIN_ROLE = "Admin"; /** * @dev Manager role identifier. */ bytes32 public constant MANAGER_ROLE = "Manager"; struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; constructor() { _registerInterface(type(IAccessControl).interfaceId); _setupRole(ROOT_ROLE, _msgSender()); _setRoleAdmin(ADMIN_ROLE, ROOT_ROLE); _setRoleAdmin(MANAGER_ROLE, ROOT_ROLE); } /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toString(role) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) private { _grantRole(role, account); _setRoleAdmin(role, ROOT_ROLE); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, getRoleAdmin(role), adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } } /** * @dev Interface for contract which allows to pause and unpause the contract. */ interface IPausable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() external view returns (bool); /** * @dev Pauses the contract. */ function pause() external; /** * @dev Unpauses the contract. */ function unpause() external; } /** * @dev Interface of a contract containing identifier for Pauser role. */ interface IRoleContainerPauser { /** * @dev Returns Pauser role identifier. */ function PAUSER_ROLE() external view returns (bytes32); } /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ contract Pausable is AccessControl, IPausable, IRoleContainerPauser { /** * @dev Pauser role identifier. */ bytes32 public constant PAUSER_ROLE = "Pauser"; bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () { _registerInterface(type(IPausable).interfaceId); _setRoleAdmin(PAUSER_ROLE, ROOT_ROLE); _paused = true; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This function is called before pausing the contract. * Override to add custom pausing conditions or actions. */ function _beforePause() internal virtual { } /** * @dev This function is called before unpausing the contract. * Override to add custom unpausing conditions or actions. */ function _beforeUnpause() internal virtual { } /** * @dev Pauses the contract. * Requirements: * - Caller must have 'PAUSER_ROLE'; * - Contract must be unpaused. */ function pause() external onlyRole(PAUSER_ROLE) whenNotPaused { _beforePause(); _pause(); } /** * @dev Unpauses the contract. * Requirements: * - Caller must have 'PAUSER_ROLE'; * - Contract must be unpaused; */ function unpause() external onlyRole(PAUSER_ROLE) whenPaused { _beforeUnpause(); _unpause(); } } contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract OpenSeaCompatible is AccessControl { using Strings for uint256; string private contractUri; string private tokenBaseUri; string private tokenUriExtension; address private proxyRegistryAddress; mapping (uint256 => string) private customTokenUri; // To support Opensea contract-level metadata // https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { return contractUri; } // To support Opensea token-level metadata (ERC721) // https://docs.opensea.io/docs/metadata-standards function _tokenURI(uint256 tokenId) internal view returns (string memory) { string memory customUri = customTokenUri[tokenId]; if (bytes(customUri).length > 0) return customUri; else return bytes(tokenBaseUri).length > 0 ? string(abi.encodePacked(tokenBaseUri, tokenId.toString(), tokenUriExtension)) : ""; } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function _isOpenSeaProxy(address owner, address operator) internal view returns (bool) { if (proxyRegistryAddress != address(0)) { // Whitelist OpenSea proxy contract for easy trading. ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress); return address(proxyRegistry.proxies(owner)) == operator; } return false; } function setContractURI(string calldata uri) external onlyRole(ADMIN_ROLE) { contractUri = uri; } function setBaseTokenURI(string calldata uri) external onlyRole(ADMIN_ROLE) { tokenBaseUri = uri; } function setTokenURIExtension(string calldata extension) external onlyRole(ADMIN_ROLE) { tokenUriExtension = extension; } function setCustomTokenUri(uint256 tokenId, string calldata uri) external onlyRole(ADMIN_ROLE) { customTokenUri[tokenId] = uri; } // OPENSEA PROXIES // ethereum: 0xa5409ec958c83c3f309868babaca7c86dcb077c1 // rinkeby: 0xf57b2c51ded3a29e6891aba85459d600256cf317 // polygon: ? // bsc: ? function setProxyRegistryAddress(address proxyAddress) external onlyRole(ADMIN_ROLE) { proxyRegistryAddress = proxyAddress; } } 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); } 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)); } } /** **************************************************************************** * @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 private constant 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 internal immutable LINK; address private immutable vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 => uint256) /* keyHash */ /* 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); } } /** * @dev Base data contract for FEAR Wolf. */ abstract contract FearWolfBase { uint64 public constant INBORN_DATA_SIZE_BITS = 36; uint64 public constant INBORN_CONTAINER_HULL = uint64(2 ** INBORN_DATA_SIZE_BITS); uint64 public constant FULL_DATA_SIZE_BITS = 92; uint64 public constant FULL_CONTAINER_HULL = uint64(2 ** FULL_DATA_SIZE_BITS); struct WolfParams { bool clanLeader; uint8 rank; uint8 clan; uint8 breed; Traits traits; UpgradeRates upgradeRates; } struct Traits { uint8 strength; uint8 speed; uint8 endurance; uint8 intelligence; uint8 howl; uint8 spirit; uint8 loyalty; } struct UpgradeRates { uint8 strengthRate; uint8 speedRate; uint8 enduranceRate; uint8 intelligenceRate; uint8 howlRate; uint8 spiritRate; uint8 loyaltyRate; } function _packParams(WolfParams memory params) internal pure returns(uint256 packedParams) { packedParams += params.traits.loyalty; packedParams <<= 8; packedParams += params.traits.spirit; packedParams <<= 8; packedParams += params.traits.howl; packedParams <<= 8; packedParams += params.traits.intelligence; packedParams <<= 8; packedParams += params.traits.endurance; packedParams <<= 8; packedParams += params.traits.speed; packedParams <<= 8; packedParams += params.traits.strength; packedParams <<= 4; packedParams += params.upgradeRates.loyaltyRate; packedParams <<= 4; packedParams += params.upgradeRates.spiritRate; packedParams <<= 4; packedParams += params.upgradeRates.howlRate; packedParams <<= 4; packedParams += params.upgradeRates.intelligenceRate; packedParams <<= 4; packedParams += params.upgradeRates.enduranceRate; packedParams <<= 4; packedParams += params.upgradeRates.speedRate; packedParams <<= 4; packedParams += params.upgradeRates.strengthRate; packedParams <<= 3; packedParams += params.breed; packedParams <<= 3; packedParams += params.clan; packedParams <<= 2; packedParams += params.rank; if (params.clanLeader) packedParams += 3; } function _unpackParams(uint256 packedParams) internal pure returns (WolfParams memory params) { params.rank = uint8((packedParams % (2**2)) % 3); params.clan = uint8((packedParams >> 2) % 8); params.breed = uint8((packedParams >> 5) % 8); params.clanLeader = packedParams % 4 == 3; params.upgradeRates.strengthRate = uint8((packedParams >> 8) % 16); params.upgradeRates.speedRate = uint8((packedParams >> 12) % 16); params.upgradeRates.enduranceRate = uint8((packedParams >> 16) % 16); params.upgradeRates.intelligenceRate = uint8((packedParams >> 20) % 16); params.upgradeRates.howlRate = uint8((packedParams >> 24) % 16); params.upgradeRates.spiritRate = uint8((packedParams >> 28) % 16); params.upgradeRates.loyaltyRate = uint8((packedParams >> 32) % 16); params.traits.strength = uint8((packedParams >> 36) % 16); params.traits.speed = uint8((packedParams >> 44) % 16); params.traits.endurance = uint8((packedParams >> 52) % 16); params.traits.intelligence = uint8((packedParams >> 60) % 16); params.traits.howl = uint8((packedParams >> 68) % 16); params.traits.spirit = uint8((packedParams >> 76) % 16); params.traits.loyalty = uint8((packedParams >> 84) % 16); } } interface IFuzzer { function getFuzz() external view returns (uint256); } /** * @dev Contract of FEAR Wolf NFT (ERC-721). */ contract FearWolf is FearWolfBase, ERC721Enumerable, AccessControl, Pausable, OpenSeaCompatible, VRFConsumerBase, IMRC721Metadata { /** * @dev Emitted when token parameters are updated. */ event TokenUpdated(uint256 indexed tokenId, uint256 curParams, uint256 newParams, address operator); bytes32 public constant DISTRIBUTOR_ROLE = "Distributor"; bytes32 public constant OPERATOR_ROLE = "Operator"; bytes32 public constant BRIDGER_ROLE = "Bridger"; uint64 private constant MAIN_CHAINID = 1; uint64 private constant RANDOM_DATA_SIZE_BITS = 40; // we need 39, but leave some extra here. still have capacity for that uint64 private constant RANDOM_CONTAINER_HULL = uint64(2 ** RANDOM_DATA_SIZE_BITS); uint64 private constant RANDOMNESS_SPLIT = 256 / RANDOM_DATA_SIZE_BITS; uint8 private constant ALPHA = 0; uint8 private constant BETA = 1; uint8 private constant OMEGA = 2; uint8 private constant STRENGTH = 0; uint8 private constant SPEED = 1; uint8 private constant ENDURANCE = 2; uint8 private constant INTELLIGENCE = 3; uint8 private constant HOWL = 4; uint8 private constant SPIRIT = 5; uint8 private constant LOYALTY = 6; uint8 private constant MIN = 0; uint8 private constant MAX = 1; // VRF bytes32 private vrfKeyHash; uint256 private vrfFee; mapping (uint256 => uint256) private wolfParams; uint256 private generationRandomness; uint256 private distributionRandomness; uint256 private fuzz = 1; uint64 private unownedWolvesCount; uint64[] private wolvesRandomness; uint16 private chainStartId; uint16 private chainPopulation; // ranks-clans-breeds-traits (generation stuff) uint16[] private ranksLimits; // total on all chains: [666, 1350, 4650]; uint16[] private rankPerClanLimits; // total on all chains: [133, 270, 930]; // alpha, beta, omega uint16[] private breedPerRankLimits; // total on all chains: [133, 135, 186]; // alpha, beta, omega uint16[][] private rankClanCounts = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]; uint16[][] private breedClanCounts = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]; uint8[][][] private ratesLimits = [[[9, 10], [6, 9], [1, 8]], [[9, 10], [6, 9], [1, 8]], [[9, 10], [6, 9], [1, 8]], [[7, 10], [5, 8], [1, 8]], [[7, 10], [5, 8], [1, 8]], [[7, 10], [5, 8], [1, 8]], [[7, 10], [5, 8], [1, 8]]]; bool[] private clanLeadersSet = [false, false, false, false, false]; bool private mysteryBoxMode = true; constructor(address vrfCoordinatorAddress, address linkTokenAddress, bytes32 _vrfKeyHash, uint256 _vrfFee) ERC721("FEAR Wolf", "FEARWOLF") VRFConsumerBase(vrfCoordinatorAddress, linkTokenAddress) { _setRoleAdmin(DISTRIBUTOR_ROLE, ROOT_ROLE); _setRoleAdmin(OPERATOR_ROLE, ROOT_ROLE); _setRoleAdmin(BRIDGER_ROLE, ROOT_ROLE); vrfKeyHash = _vrfKeyHash; vrfFee = _vrfFee; wolfParams[0] = 0; // params for mystery box } function _beforePause() internal virtual override { revert("Once unleashed FEAR Wolf cannot be stopped"); // cannot pause! } function _beforeUnpause() internal virtual override { require(unownedWolvesCount == chainPopulation, "Not enough unowned wolves"); require(ranksLimits.length > 0, "Limits are not set"); } function _getTotalCountByRank(uint256 rank) private view returns (uint16) { return rankClanCounts[rank][0] + rankClanCounts[rank][1] + rankClanCounts[rank][2] + rankClanCounts[rank][3] + rankClanCounts[rank][4]; } function _normalize(uint256 value, uint256 min, uint256 max) private pure returns (uint256) { uint256 interval = max - min + 1; return value % interval + min; } function _normalizeByte(uint8 value, uint8 min, uint8 max) private pure returns (uint8) { uint8 interval = max - min + 1; return value % interval + min; } function _getCurrentRandomness(uint256 initialRandomness, uint256 i) private view returns (uint256) { return uint256(keccak256(abi.encode(initialRandomness, block.timestamp, i))); } function _getNextRandomTokenIndex(uint256 i) private view returns (uint256) { return _getCurrentRandomness(distributionRandomness, i) % chainPopulation; } //// RANDOMIZATION // Chainlink VRF handler function fulfillRandomness(bytes32, uint256 randomness) internal override { if (distributionRandomness == 0) distributionRandomness = randomness; else if (generationRandomness == 0) generationRandomness = randomness; } function _randomizeWolf(uint256 tokenId, uint64 randomness) private { (uint8 rank, uint8 clan, uint8 breed) = _determineRankClanBreed(randomness); bool clanLeader = !clanLeadersSet[clan] && rankClanCounts[ALPHA][clan] >= rankPerClanLimits[ALPHA] / 10 && randomness % 32 == 0 && block.chainid == MAIN_CHAINID; WolfParams memory params; params.rank = rank; params.clan = clan; params.breed = breed; params.clanLeader = clanLeader; params.upgradeRates.strengthRate = _normalizeByte(uint8((randomness >> 11) % 16), ratesLimits[STRENGTH][rank][MIN], ratesLimits[STRENGTH][rank][MAX]); params.upgradeRates.speedRate = _normalizeByte(uint8((randomness >> 15) % 16), ratesLimits[SPEED][rank][MIN], ratesLimits[SPEED][rank][MAX]); params.upgradeRates.enduranceRate = _normalizeByte(uint8((randomness >> 19) % 16), ratesLimits[ENDURANCE][rank][MIN], ratesLimits[ENDURANCE][rank][MAX]); params.upgradeRates.intelligenceRate = _normalizeByte(uint8((randomness >> 23) % 16), ratesLimits[INTELLIGENCE][rank][MIN], ratesLimits[INTELLIGENCE][rank][MAX]); params.upgradeRates.howlRate = _normalizeByte(uint8((randomness >> 27) % 16), ratesLimits[HOWL][rank][MIN], ratesLimits[HOWL][rank][MAX]); params.upgradeRates.spiritRate = _normalizeByte(uint8((randomness >> 31) % 16), ratesLimits[SPIRIT][rank][MIN], ratesLimits[SPIRIT][rank][MAX]); params.upgradeRates.loyaltyRate = _normalizeByte(uint8((randomness >> 35) % 16), ratesLimits[LOYALTY][rank][MIN], ratesLimits[LOYALTY][rank][MAX]); if (clanLeader) { _boostClanLeader(params); clanLeadersSet[clan] = true; } wolfParams[tokenId] = _packParams(params); rankClanCounts[rank][clan]++; breedClanCounts[breed][clan]++; } function _determineRankClanBreed(uint256 randomness) private view returns (uint8 rank, uint8 clan, uint8 breed) { if (randomness % 32 >= 10) rank = OMEGA; else if (randomness % 32 >= 3) rank = BETA; while (_getTotalCountByRank(rank) == ranksLimits[rank]) rank = (rank + 1) % 3; if (rank == ALPHA && block.chainid == MAIN_CHAINID && _getTotalCountByRank(ALPHA) == ranksLimits[ALPHA] - 1) { clan = 4; // last alpha on the main chain goes to Vanguards } else { clan = uint8((randomness >> 5) % 5); while (rankClanCounts[rank][clan] >= rankPerClanLimits[rank]) clan = (clan + 1) % 5; } if (rank == BETA) { breed = _normalizeByte(uint8((randomness >> 8) % 2), 1, 2); while (breedClanCounts[breed][clan] == breedPerRankLimits[rank]) breed = (breed % 2) + 1; // 1 -> 2, 2 -> 1 } else if (rank == OMEGA) { breed = _normalizeByte(uint8((randomness >> 8) % 5), 3, 7); while (breedClanCounts[breed][clan] == breedPerRankLimits[rank] || breed < 3) breed = (breed + 1) % 8; } } function _boostClanLeader(WolfParams memory params) private view { if (params.upgradeRates.strengthRate < ratesLimits[STRENGTH][ALPHA][MAX]) params.upgradeRates.strengthRate += 1; if (params.upgradeRates.speedRate < ratesLimits[SPEED][ALPHA][MAX]) params.upgradeRates.speedRate += 1; if (params.upgradeRates.enduranceRate < ratesLimits[ENDURANCE][ALPHA][MAX]) params.upgradeRates.enduranceRate += 1; if (params.upgradeRates.intelligenceRate < ratesLimits[INTELLIGENCE][ALPHA][MAX]) params.upgradeRates.intelligenceRate += 1; if (params.upgradeRates.howlRate < ratesLimits[HOWL][ALPHA][MAX]) params.upgradeRates.howlRate += 1; if (params.upgradeRates.spiritRate < ratesLimits[SPIRIT][ALPHA][MAX]) params.upgradeRates.spiritRate += 1; if (params.upgradeRates.loyaltyRate < ratesLimits[LOYALTY][ALPHA][MAX]) params.upgradeRates.loyaltyRate += 1; } //// DISTRIBUTION /** * @dev Allows to mint and randomize new FEAR Wolf and assign it to the owner. * @param initialOwner Owner address. * @param wolvesCount Number of wolves to mint. * Requirements: * - Contract must not be paused; * - Caller must have 'DISTRIBUTOR_ROLE'; * - Number of still unowned wolves must be greater than or equal to amount of wolves to mint. */ function setInitialOwner(address initialOwner, uint256 wolvesCount) external whenNotPaused onlyRole(DISTRIBUTOR_ROLE) { require(unownedWolvesCount >= wolvesCount, "Not enough unowned wolves"); for (uint i = 0; i < wolvesCount; i++) { uint256 tokenIndex = _normalize(_getNextRandomTokenIndex(i), 0, unownedWolvesCount - 1); uint64 randomness = wolvesRandomness[tokenIndex]; uint64 tokenId = randomness >> RANDOM_DATA_SIZE_BITS; wolvesRandomness[tokenIndex] = wolvesRandomness[unownedWolvesCount - 1]; delete wolvesRandomness[unownedWolvesCount - 1]; unownedWolvesCount--; _safeMint(initialOwner, tokenId); _randomizeWolf(tokenId, randomness); } } //// VIEW AND UPDATE /** * @dev Returns FEAR Wolf parameters in human-readable format. * @param tokenId Id of FEAR Wolf. * Requirements: * - Token with provided id must exist. */ function getTokenParams(uint256 tokenId) external view tokenExists(tokenId) returns (WolfParams memory) { return _unpackParams(mysteryBoxMode ? wolfParams[0] : wolfParams[tokenId]); } /** @dev Returns FEAR Wolf parameters in raw format. * @param tokenId Id of FEAR Wolf. * Requirements: * - Token with provided id must exist. */ function getRawTokenParams(uint256 tokenId) external view tokenExists(tokenId) returns (uint256) { return mysteryBoxMode ? wolfParams[0] : wolfParams[tokenId]; } /** @dev Updates FEAR Wolf parameters. * @param tokenId Id of FEAR Wolf. * Requirements: * - Token with provided id must exist; * - Caller must have 'OPERATOR_ROLE'; * - Inborn parameters (rank/clan/breed/upgradeRates) must stay unaltered. * Emits {TokenUpdated} event on success. */ function updateTokenParams(uint256 tokenId, uint256 params) external tokenExists(tokenId) onlyRole(OPERATOR_ROLE) { uint256 curParams = wolfParams[tokenId]; require(curParams % INBORN_CONTAINER_HULL == params % INBORN_CONTAINER_HULL, "Inborn parameters was changed"); wolfParams[tokenId] = params; emit TokenUpdated(tokenId, curParams, params, _msgSender()); } //// OPENSEA AND ERC721ENUMERABLE STUFF function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { return _isOpenSeaProxy(owner, operator) || super.isApprovedForAll(owner, operator); } function totalSupply() public view virtual override(ERC721Enumerable, IMRC721) returns (uint256) { return ERC721Enumerable.totalSupply(); } function tokenURI(uint256 tokenId) public view virtual override tokenExists(tokenId) returns (string memory) { return OpenSeaCompatible._tokenURI(tokenId); } //// MUON BRIDGING function encodeParams(uint256 id) public view returns(bytes memory){ return abi.encode(wolfParams[id] * fuzz); } function encodeParams(uint256[] calldata ids) public view returns(bytes memory){ bytes[] memory params = new bytes[](ids.length); for(uint i = 0; i < ids.length; i++) params[i] = encodeParams(ids[i]); return abi.encode(params); } function mint(address, uint256) external view onlyRole(BRIDGER_ROLE) { revert("Use mint with data argument"); } function mint(address to, uint256 id, bytes calldata data) external tokenNotMinted(id) onlyRole(BRIDGER_ROLE) { _safeMint(to, id); wolfParams[id]= abi.decode(data, (uint256)) / fuzz; } function burn(uint256 tokenId) external onlyRole(BRIDGER_ROLE) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Caller is not owner nor approved"); _burn(tokenId); } function tokensOfOwner(address owner) external view returns(uint256[] memory) { uint tokenCount = balanceOf(owner); uint256[] memory tokensIds = new uint256[](tokenCount); for(uint i = 0; i < tokenCount; i++) tokensIds[i] = tokenOfOwnerByIndex(owner, i); return tokensIds; } //// ADMIN SETUP FUNCTIONS function loadInitialRandomness() external whenPaused onlyRole(ADMIN_ROLE) { requestRandomness(vrfKeyHash, vrfFee); requestRandomness(vrfKeyHash, vrfFee); } function scaleGenerationRandomness(uint16 iterations) external whenPaused onlyRole(ADMIN_ROLE) { require(generationRandomness > 0, "Initial randomness is not set"); require(chainPopulation > 0, "Chain parameters are not set"); uint64 fullSteps = iterations * RANDOMNESS_SPLIT; if (unownedWolvesCount + fullSteps > chainPopulation) fullSteps = chainPopulation - unownedWolvesCount; uint256 currentRandomness; for (uint i = 0; i < fullSteps; i++) { if (i % RANDOMNESS_SPLIT == 0) currentRandomness = _getCurrentRandomness(generationRandomness, i); wolvesRandomness.push( uint64((currentRandomness >> (RANDOM_DATA_SIZE_BITS * (i % RANDOMNESS_SPLIT))) % RANDOM_CONTAINER_HULL + (RANDOM_CONTAINER_HULL * (unownedWolvesCount + i + chainStartId)))); } unownedWolvesCount += fullSteps; } function getUnownedWolvesCount() external view onlyRole(ADMIN_ROLE) returns (uint64) { return unownedWolvesCount; } function setMysteryBoxModeState(bool state) external onlyRole(ADMIN_ROLE) { mysteryBoxMode = state; } function setFuzz(address _address) external onlyRole(ADMIN_ROLE) { fuzz = IFuzzer(_address).getFuzz(); } function setChainParameters(uint16 _chainStartId, uint16 _chainPopulation) external whenPaused onlyRole(ADMIN_ROLE) { chainStartId = _chainStartId; chainPopulation = _chainPopulation; delete wolvesRandomness; unownedWolvesCount = 0; } function setLimits(uint16[] memory _ranksLimits, uint16[] memory _rankPerClanLimits, uint16[] memory _breedPerRankLimits) external whenPaused onlyRole(ADMIN_ROLE) { require(_ranksLimits.length == 3 &&_rankPerClanLimits.length == 3 && _breedPerRankLimits.length == 3, "Incorrect limits"); ranksLimits = _ranksLimits; rankPerClanLimits = _rankPerClanLimits; breedPerRankLimits = _breedPerRankLimits; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"vrfCoordinatorAddress","type":"address"},{"internalType":"address","name":"linkTokenAddress","type":"address"},{"internalType":"bytes32","name":"_vrfKeyHash","type":"bytes32"},{"internalType":"uint256","name":"_vrfFee","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"curParams","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newParams","type":"uint256"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"TokenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BRIDGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISTRIBUTOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FULL_CONTAINER_HULL","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FULL_DATA_SIZE_BITS","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INBORN_CONTAINER_HULL","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INBORN_DATA_SIZE_BITS","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"encodeParams","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"encodeParams","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"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":"tokenId","type":"uint256"}],"name":"getRawTokenParams","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenParams","outputs":[{"components":[{"internalType":"bool","name":"clanLeader","type":"bool"},{"internalType":"uint8","name":"rank","type":"uint8"},{"internalType":"uint8","name":"clan","type":"uint8"},{"internalType":"uint8","name":"breed","type":"uint8"},{"components":[{"internalType":"uint8","name":"strength","type":"uint8"},{"internalType":"uint8","name":"speed","type":"uint8"},{"internalType":"uint8","name":"endurance","type":"uint8"},{"internalType":"uint8","name":"intelligence","type":"uint8"},{"internalType":"uint8","name":"howl","type":"uint8"},{"internalType":"uint8","name":"spirit","type":"uint8"},{"internalType":"uint8","name":"loyalty","type":"uint8"}],"internalType":"struct FearWolfBase.Traits","name":"traits","type":"tuple"},{"components":[{"internalType":"uint8","name":"strengthRate","type":"uint8"},{"internalType":"uint8","name":"speedRate","type":"uint8"},{"internalType":"uint8","name":"enduranceRate","type":"uint8"},{"internalType":"uint8","name":"intelligenceRate","type":"uint8"},{"internalType":"uint8","name":"howlRate","type":"uint8"},{"internalType":"uint8","name":"spiritRate","type":"uint8"},{"internalType":"uint8","name":"loyaltyRate","type":"uint8"}],"internalType":"struct FearWolfBase.UpgradeRates","name":"upgradeRates","type":"tuple"}],"internalType":"struct FearWolfBase.WolfParams","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnownedWolvesCount","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loadInitialRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"iterations","type":"uint16"}],"name":"scaleGenerationRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainStartId","type":"uint16"},{"internalType":"uint16","name":"_chainPopulation","type":"uint16"}],"name":"setChainParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setCustomTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setFuzz","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"},{"internalType":"uint256","name":"wolvesCount","type":"uint256"}],"name":"setInitialOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_ranksLimits","type":"uint16[]"},{"internalType":"uint16[]","name":"_rankPerClanLimits","type":"uint16[]"},{"internalType":"uint16[]","name":"_breedPerRankLimits","type":"uint16[]"}],"name":"setLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setMysteryBoxModeState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"setProxyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"extension","type":"string"}],"name":"setTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"params","type":"uint256"}],"name":"updateTokenParams","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600160185560006101208181526101408290526101608290526101808290526101a082905260c09081526101c08281526101e083905261020083905261022083905261024083905260e0526103006040526102608281526102808390526102a08390526102c08390526102e092909252610100919091526200008690601f906003620007ff565b50604080516101a0810182526000610100820181815261012083018290526101408301829052610160830182905261018083018290528252825160a081810185528282526020828101849052828601849052606080840185905260808085018690528287019490945286518084018852858152808301869052808801869052808201869052808501869052868801528651808401885285815280830186905280880186905280820186905280850186905281870152865180840188528581528083018690528088018690528082018690528085018690528487015286518084018852858152808301869052808801869052808201869052808501869052838701528651808401885285815280830186905280880186905280820186905280850186905260c0870152865192830187528483528282018590529582018490529481018390529081019190915260e0820152620001e4919060086200085d565b50604080516101808101825260096101408201818152600a610160840181905260e0840191825284518086018652600680825260208281018690526101008701929092528651808801885260018082526008828501819052610120890192909252948752875160a08181018a52606082810189815260808481018990529084528b51808d018d528681528088018b9052848801528b51808d018d52898152808801869052848d0152868b01939093528a518083018c528082018a815281850189905281528b51808d018d5295865285870199909952888601949094528951808b018b52878152808601849052888b0152888a019790975288518088018a52600781850181815282840188905282528a51808c018c526005808252818801869052838801919091528b51808d018d52898152808801869052838d0152858b01929092528a51808a018c5280860182815281850189905281528b51808d018d52838152808801869052818801528b51808d018d52898152808801869052818d0152838b01528a51808a018c5280860182815281850189905281528b51808d018d52838152808801869052818801528b51808d018d52898152808801869052818d0152898b01528a519889018b52938801848152918801959095528652875180890189529384528383018190528583019390935286518088018852938452908301919091529382015260c0820152620003fe9160219190620008a9565b506040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526200043a90602290600562000903565b506023805460ff191660011790553480156200045557600080fd5b50604051620066df380380620066df833981016040819052620004789162000c8f565b60408051808201825260098152682322a0a9102bb7b63360b91b6020808301918252835180850190945260088452672322a0a92ba7a62360c11b90840152815187938793929091620004cd91600191620009ab565b508051620004e3906002906020840190620009ab565b50620004f66380ac58cd60e01b62000660565b62000508635b5e139f60e01b62000660565b506200051d905063780e9d6360e01b62000660565b6200052f637965db0b60e01b62000660565b6200054263149bdbdd60e21b33620006e4565b6200055d6420b236b4b760d91b63149bdbdd60e21b62000707565b6200057a6626b0b730b3b2b960c91b63149bdbdd60e21b62000707565b6200058c631cf1473b60e31b62000660565b620005a8652830bab9b2b960d11b63149bdbdd60e21b62000707565b600c805460ff191660011790556001600160a01b0391821660a05216608052620005e86a2234b9ba3934b13aba37b960a91b63149bdbdd60e21b62000707565b620006066727b832b930ba37b960c11b63149bdbdd60e21b62000707565b6200062366213934b233b2b960c91b63149bdbdd60e21b62000707565b6013919091556014555050600080805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed5562000d14565b6001600160e01b03198082161415620006bf5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b620006f082826200075b565b620007038263149bdbdd60e21b62000707565b5050565b6000828152600b6020526040902060010154819060405184907fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff90600090a46000918252600b602052604090912060010155565b6000828152600b602090815260408083206001600160a01b038516845290915290205460ff1662000703576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620007bb3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280548282559060005260206000209081019282156200084b579160200282015b828111156200084b5782516200083a908390600562000a28565b509160200191906001019062000820565b506200085992915062000ac3565b5090565b8280548282559060005260206000209081019282156200084b579160200282015b828111156200084b57825162000898908390600562000a28565b50916020019190600101906200087e565b828054828255906000526020600020908101928215620008f5579160200282015b82811115620008f5578251620008e4908390600362000ae4565b5091602001919060010190620008ca565b506200085992915062000b3e565b82805482825590600052602060002090601f016020900481019282156200099d5791602002820160005b838211156200096c57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026200092d565b80156200099b5782816101000a81549060ff02191690556001016020816000010492830192600103026200096c565b505b506200085992915062000b5f565b828054620009b99062000cd7565b90600052602060002090601f016020900481019282620009dd57600085556200099d565b82601f10620009f857805160ff19168380011785556200099d565b828001600101855582156200099d579182015b828111156200099d57825182559160200191906001019062000a0b565b82805482825590600052602060002090600f016010900481019282156200099d5791602002820160005b8382111562000a9357835183826101000a81548161ffff021916908360ff160217905550926020019260020160208160010104928301926001030262000a52565b80156200099b5782816101000a81549061ffff021916905560020160208160010104928301926001030262000a93565b808211156200085957600062000ada828262000b76565b5060010162000ac3565b82805482825590600052602060002090810192821562000b30579160200282015b8281111562000b3057825162000b1f908390600262000ba0565b509160200191906001019062000b05565b506200085992915062000c0a565b808211156200085957600062000b55828262000c2b565b5060010162000b3e565b5b8082111562000859576000815560010162000b60565b50805460008255600f01601090049060005260206000209081019062000b9d919062000b5f565b50565b82805482825590600052602060002090601f016020900481019282156200099d5791602002820160005b838211156200096c57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000bca565b808211156200085957600062000c21828262000c4b565b5060010162000c0a565b508054600082559060005260206000209081019062000b9d919062000c0a565b50805460008255601f01602090049060005260206000209081019062000b9d919062000b5f565b80516001600160a01b038116811462000c8a57600080fd5b919050565b6000806000806080858703121562000ca657600080fd5b62000cb18562000c72565b935062000cc16020860162000c72565b6040860151606090960151949790965092505050565b600181811c9082168062000cec57607f821691505b6020821081141562000d0e57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05161599e62000d41600039600081816118a00152611eda01526000611eab015261599e6000f3fe608060405234801561001057600080fd5b50600436106103995760003560e01c806364cb9782116101e957806395d89b411161010f578063dbaa56fb116100ad578063ec87621c1161007c578063ec87621c146107b0578063f0bd87cc146107c1578063f5b541a6146107d6578063f95708c1146107e857600080fd5b8063dbaa56fb14610772578063e63ab1e914610785578063e8a3d48514610795578063e985e9c51461079d57600080fd5b8063b88d4fde116100e9578063b88d4fde14610726578063c87b56dd14610739578063d26ea6c01461074c578063d547741f1461075f57600080fd5b806395d89b41146106f8578063a22cb46514610700578063a75a90491461071357600080fd5b80637e8c7f081161018757806391d148541161015657806391d14854146106ac578063938e3d7b146106bf57806394985ddd146106d257806394d008ef146106e557600080fd5b80637e8c7f08146106635780638456cb59146106715780638462151c146106795780638fe226511461069957600080fd5b8063733bc7ea116101c3578063733bc7ea1461063157806375b238fc1461063957806379e1e68b146106485780637e4921d51461065b57600080fd5b806364cb9782146105f65780636be63669146105fe57806370a082311461061e57600080fd5b806330176e13116102ce57806342966c681161026c57806360317e751161023b57806360317e75146105aa57806360affab3146105bd578063620f9c0c146105d05780636352211e146105e357600080fd5b806342966c68146105665780634c23061b146105795780634f6ccce71461058c5780635c975abb1461059f57600080fd5b80633e9564f7116102a85780633e9564f7146105255780633f4ba83a1461053857806340c10f191461054057806342842e0e1461055357600080fd5b806330176e13146104ee57806336568abe146105015780633d75e4511461051457600080fd5b80631b267eab1161033b57806327ae3a971161031557806327ae3a97146104a25780632d9f6154146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b80631b267eab1461045957806323b872dd1461046c578063248a9ca31461047f57600080fd5b8063095ea7b311610377578063095ea7b3146104065780631241761b1461041b57806318160ddd1461043b57806318b8206f1461045157600080fd5b806301ffc9a71461039e57806306fdde03146103c6578063081812fc146103db575b600080fd5b6103b16103ac366004614a7e565b6107f0565b60405190151581526020015b60405180910390f35b6103ce61082e565b6040516103bd9190614af3565b6103ee6103e9366004614b06565b6108c0565b6040516001600160a01b0390911681526020016103bd565b610419610414366004614b34565b610912565b005b610423605c81565b6040516001600160401b0390911681526020016103bd565b610443610a28565b6040519081526020016103bd565b610419610a38565b610419610467366004614ba8565b610a8e565b61041961047a366004614bf3565b610ac1565b61044361048d366004614b06565b6000908152600b602052604090206001015490565b6104436104b0366004614b06565b610af2565b6103ce6104c3366004614b06565b610b6b565b6104196104d6366004614c34565b610bb1565b6104436104e9366004614b34565b610bd7565b6104196104fc366004614c64565b610c6d565b61041961050f366004614c34565b610c92565b61044366213934b233b2b960c91b81565b610419610533366004614c64565b610d0c565b610419610d2b565b61041961054e366004614b34565b610d74565b610419610561366004614bf3565b610dd1565b610419610574366004614b06565b610dec565b610419610587366004614ca5565b610e61565b61044361059a366004614b06565b610f9b565b600c5460ff166103b1565b6104196105b8366004614da5565b61102e565b6104196105cb366004614e2c565b6110fc565b6104196105de366004614e5f565b611172565b6103ee6105f1366004614b06565b6111fd565b610423611242565b61061161060c366004614b06565b61126a565b6040516103bd9190614ed1565b61044361062c366004614e5f565b6112ea565b610423602481565b6104436420b236b4b760d91b81565b6103ce610656366004614f2d565b611371565b610423611449565b61044363149bdbdd60e21b81565b610419611458565b61068c610687366004614e5f565b61149f565b6040516103bd9190614fa1565b6104196106a7366004614fe5565b611540565b6103b16106ba366004614c34565b61184b565b6104196106cd366004614c64565b611876565b6104196106e0366004614ca5565b611895565b6104196106f3366004615000565b611917565b6103ce6119c0565b61041961070e366004615069565b6119cf565b610419610721366004614b34565b6119da565b610419610734366004615097565b611c7a565b6103ce610747366004614b06565b611cab565b61041961075a366004614e5f565b611cdc565b61041961076d366004614c34565b611d12565b61041961078036600461515a565b611d38565b610443652830bab9b2b960d11b81565b6103ce611d5f565b6103b16107ab366004615177565b611d6e565b6104436626b0b730b3b2b960c91b81565b6104436a2234b9ba3934b13aba37b960a91b81565b6104436727b832b930ba37b960c11b81565b610423611dae565b6001600160e01b0319811660009081526020819052604081205460ff168061082857506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461083d906151a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610869906151a5565b80156108b65780601f1061088b576101008083540402835291602001916108b6565b820191906000526020600020905b81548152906001019060200180831161089957829003601f168201915b5050505050905090565b6000816108cc81611dba565b6108f15760405162461bcd60e51b81526004016108e8906151da565b60405180910390fd5b6000838152600560205260409020546001600160a01b031691505b50919050565b600061091d826111fd565b9050806001600160a01b0316836001600160a01b0316141561098b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108e8565b336001600160a01b03821614806109a757506109a78133611d6e565b610a195760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108e8565b610a238383611dd7565b505050565b6000610a3360095490565b905090565b600c5460ff16610a5a5760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b610a6d8133611e45565b610a7b601354601454611ea7565b50610a8a601354601454611ea7565b5050565b6420b236b4b760d91b610aa18133611e45565b6000848152601160205260409020610aba90848461486f565b5050505050565b610acb338261203a565b610ae75760405162461bcd60e51b81526004016108e89061524b565b610a238383836120c3565b600081610afe81611dba565b610b1a5760405162461bcd60e51b81526004016108e8906151da565b60235460ff16610b3857600083815260156020526040902054610b64565b6000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed545b9392505050565b601854600082815260156020526040902054606091610b89916152b2565b604051602001610b9b91815260200190565b6040516020818303038152906040529050919050565b6000828152600b6020526040902060010154610bcd8133611e45565b610a23838361226a565b6000610be2836112ea565b8210610c445760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108e8565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6420b236b4b760d91b610c808133611e45565b610c8c600e848461486f565b50505050565b6001600160a01b0381163314610d025760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108e8565b610a8a82826122f0565b6420b236b4b760d91b610d1f8133611e45565b610c8c600f848461486f565b652830bab9b2b960d11b610d3f8133611e45565b600c5460ff16610d615760405162461bcd60e51b81526004016108e89061521d565b610d69612357565b610d71612402565b50565b66213934b233b2b960c91b610d898133611e45565b60405162461bcd60e51b815260206004820152601b60248201527f557365206d696e742077697468206461746120617267756d656e74000000000060448201526064016108e8565b610a2383838360405180602001604052806000815250611c7a565b66213934b233b2b960c91b610e018133611e45565b610e0c335b8361203a565b610e585760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656460448201526064016108e8565b610a8a8261246e565b81610e6b81611dba565b610e875760405162461bcd60e51b81526004016108e8906151da565b6727b832b930ba37b960c11b610e9d8133611e45565b600084815260156020526040902054610eb8602460026153b5565b610ecb906001600160401b0316856153e0565b610ed7602460026153b5565b610eea906001600160401b0316836153e0565b14610f375760405162461bcd60e51b815260206004820152601d60248201527f496e626f726e20706172616d657465727320776173206368616e67656400000060448201526064016108e8565b6000858152601560205260409020849055847f33d49995976956f0060b8535a0342cbd3d34e8bf3674f285d4d19a32f2107e678286336040805193845260208401929092526001600160a01b03169082015260600160405180910390a25050505050565b6000610fa660095490565b82106110095760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108e8565b6009828154811061101c5761101c6153f4565b90600052602060002001549050919050565b600c5460ff166110505760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6110638133611e45565b83516003148015611075575082516003145b8015611082575081516003145b6110c15760405162461bcd60e51b815260206004820152601060248201526f496e636f7272656374206c696d69747360801b60448201526064016108e8565b83516110d490601c9060208701906148ef565b5082516110e890601d9060208601906148ef565b508151610aba90601e9060208501906148ef565b600c5460ff1661111e5760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6111318133611e45565b601b805461ffff848116620100000263ffffffff199092169086161717905561115c601a6000614993565b50506019805467ffffffffffffffff1916905550565b6420b236b4b760d91b6111858133611e45565b816001600160a01b0316636896c6ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111be57600080fd5b505afa1580156111d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f6919061540a565b6018555050565b60008161120981611dba565b6112255760405162461bcd60e51b81526004016108e8906151da565b50506000908152600360205260409020546001600160a01b031690565b60006420b236b4b760d91b6112578133611e45565b6019546001600160401b031691505b5090565b6112726149b8565b8161127c81611dba565b6112985760405162461bcd60e51b81526004016108e8906151da565b602354610b649060ff166112ba57600084815260156020526040902054612515565b6000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed54612515565b60006001600160a01b0382166113555760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108e8565b506001600160a01b031660009081526004602052604090205490565b60606000826001600160401b0381111561138d5761138d614cc7565b6040519080825280602002602001820160405280156113c057816020015b60608152602001906001900390816113ab5790505b50905060005b8381101561141f576113ef8585838181106113e3576113e36153f4565b90506020020135610b6b565b828281518110611401576114016153f4565b6020026020010181905250808061141790615423565b9150506113c6565b5080604051602001611431919061543e565b60405160208183030381529060405291505092915050565b611455605c60026153b5565b81565b652830bab9b2b960d11b61146c8133611e45565b600c5460ff161561148f5760405162461bcd60e51b81526004016108e8906154a0565b611497612723565b610d7161277e565b606060006114ac836112ea565b90506000816001600160401b038111156114c8576114c8614cc7565b6040519080825280602002602001820160405280156114f1578160200160208202803683370190505b50905060005b82811015611538576115098582610bd7565b82828151811061151b5761151b6153f4565b60209081029190910101528061153081615423565b9150506114f7565b509392505050565b600c5460ff166115625760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6115758133611e45565b6000601654116115c75760405162461bcd60e51b815260206004820152601d60248201527f496e697469616c2072616e646f6d6e657373206973206e6f742073657400000060448201526064016108e8565b601b5462010000900461ffff166116205760405162461bcd60e51b815260206004820152601c60248201527f436861696e20706172616d657465727320617265206e6f74207365740000000060448201526064016108e8565b600061162f60286101006154ca565b61163d9061ffff85166154f0565b601b5460195491925062010000900461ffff16906116659083906001600160401b031661551f565b6001600160401b0316111561169a57601954601b54611697916001600160401b03169062010000900461ffff1661554a565b90505b6000805b826001600160401b0316811015611802576116bc60286101006154ca565b6116cf906001600160401b0316826153e0565b61170f5761170c60165482604080516020808201949094524281830152606080820193909352815180820390930183526080019052805191012090565b91505b601b54601954601a9161ffff16906117319084906001600160401b0316615572565b61173b9190615572565b611747602860026153b5565b6001600160401b031661175a91906152b2565b611766602860026153b5565b6001600160401b031661177c60286101006154ca565b61178f906001600160401b0316856153e0565b61179a9060286152b2565b85901c6117a791906153e0565b6117b19190615572565b8154600181018355600092835260209092206004830401805460039093166008026101000a6001600160401b03818102199094169290931692909202179055806117fa81615423565b91505061169e565b50601980548391906000906118219084906001600160401b031661551f565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555050505050565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6420b236b4b760d91b6118898133611e45565b610c8c600d848461486f565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461190d5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016108e8565b610a8a82826127d6565b8261192181611dba565b1561196e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108e8565b66213934b233b2b960c91b6119838133611e45565b61198d86866127f0565b60185461199c84860186614b06565b6119a6919061558a565b600095865260156020526040909520949094555050505050565b60606002805461083d906151a5565b610a8a33838361280a565b600c5460ff16156119fd5760405162461bcd60e51b81526004016108e8906154a0565b6a2234b9ba3934b13aba37b960a91b611a168133611e45565b6019546001600160401b0316821115611a6d5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820756e6f776e656420776f6c76657360381b60448201526064016108e8565b60005b82811015610c8c576000611aaf611a86836128d9565b601954600090611aa1906001906001600160401b031661554a565b6001600160401b031661292e565b90506000601a8281548110611ac657611ac66153f4565b6000918252602090912060048204015460195460039092166008026101000a90046001600160401b03818116935060289190911c62ffffff1691601a91611b10916001911661554a565b6001600160401b031681548110611b2957611b296153f4565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b0316601a8481548110611b6557611b656153f4565b90600052602060002090600491828204019190066008026101000a8154816001600160401b0302191690836001600160401b03160217905550601a6001601960009054906101000a90046001600160401b0316611bc2919061554a565b6001600160401b031681548110611bdb57611bdb6153f4565b600091825260208220600482040180546001600160401b0360086003909416939093026101000a8302191690556019805490911691611c198361559e565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050611c5187826001600160401b03166127f0565b611c64816001600160401b031683612966565b5050508080611c7290615423565b915050611a70565b611c8333610e06565b611c9f5760405162461bcd60e51b81526004016108e89061524b565b610c8c8484848461316d565b606081611cb781611dba565b611cd35760405162461bcd60e51b81526004016108e8906151da565b610b64836131a0565b6420b236b4b760d91b611cef8133611e45565b50601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600b6020526040902060010154611d2e8133611e45565b610a2383836122f0565b6420b236b4b760d91b611d4b8133611e45565b506023805460ff1916911515919091179055565b6060600d805461083d906151a5565b6000611d7a83836132ae565b80610b6457506001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16610b64565b611455602460026153b5565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e0c826111fd565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e4f828261184b565b610a8a57611e67816001600160a01b0316601461335f565b611e70836134fa565b604051602001611e819291906155c1565b60408051601f198184030181529082905262461bcd60e51b82526108e891600401614af3565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611f17929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611f4493929190615636565b602060405180830381600087803b158015611f5e57600080fd5b505af1158015611f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f96919061565d565b50600083815260126020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611ff2906001615572565b6000858152601260205260409020556120328482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b60008161204681611dba565b6120625760405162461bcd60e51b81526004016108e8906151da565b600061206d846111fd565b9050806001600160a01b0316856001600160a01b031614806120a85750846001600160a01b031661209d856108c0565b6001600160a01b0316145b806120b857506120b88186611d6e565b9250505b5092915050565b826001600160a01b03166120d6826111fd565b6001600160a01b03161461213a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108e8565b6001600160a01b03821661219c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108e8565b6121a7838383613629565b6121b2600082611dd7565b6001600160a01b03831660009081526004602052604081208054600192906121db90849061567a565b90915550506001600160a01b0382166000908152600460205260408120805460019290612209908490615572565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612274828261184b565b610a8a576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122fa828261184b565b15610a8a576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b601b546019546201000090910461ffff166001600160401b03909116146123bc5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820756e6f776e656420776f6c76657360381b60448201526064016108e8565b601c546124005760405162461bcd60e51b8152602060048201526012602482015271131a5b5a5d1cc8185c99481b9bdd081cd95d60721b60448201526064016108e8565b565b600c5460ff166124245760405162461bcd60e51b81526004016108e89061521d565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612479826111fd565b905061248781600084613629565b612492600083611dd7565b6001600160a01b03811660009081526004602052604081208054600192906124bb90849061567a565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b61251d6149b8565b600361252a6004846153e0565b61253491906153e0565b60ff16602082015261254b6008600284901c6153e0565b60ff1660408201526125626008600584901c6153e0565b60ff1660608201526125756004836153e0565b60031481526125896010600884901c6153e0565b60a082015160ff90911690526125a46010600c84901c6153e0565b60a082015160ff9091166020909101526125c1601083811c6153e0565b60a082015160ff9091166040909101526125e06010601484901c6153e0565b60a082015160ff9091166060909101526125ff6010601884901c6153e0565b60a082015160ff90911660809091015261261e6010601c84901c6153e0565b60a08083015160ff90921691015261263b6010602084901c6153e0565b60a082015160ff90911660c09091015261265a6010602484901c6153e0565b608082015160ff90911690526126756010602c84901c6153e0565b608082015160ff9091166020909101526126946010603484901c6153e0565b608082015160ff9091166040909101526126b36010603c84901c6153e0565b608082015160ff9091166060909101526126d26010604484901c6153e0565b60808083015160ff9092169101526126ef6010604c84901c6153e0565b608082015160ff90911660a09091015261270e6010605484901c6153e0565b608082015160ff90911660c090910152919050565b60405162461bcd60e51b815260206004820152602a60248201527f4f6e636520756e6c656173686564204645415220576f6c662063616e6e6f74206044820152691899481cdd1bdc1c195960b21b60648201526084016108e8565b600c5460ff16156127a15760405162461bcd60e51b81526004016108e8906154a0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124513390565b6017546127e35760175550565b601654610a8a5760165550565b610a8a8282604051806020016040528060008152506136e1565b816001600160a01b0316836001600160a01b0316141561286c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108e8565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b601b5460175460009162010000900461ffff16906129249084604080516020808201949094524281830152606080820193909352815180820390930183526080019052805191012090565b61082891906153e0565b60008061293b848461567a565b612946906001615572565b90508361295382876153e0565b61295d9190615572565b95945050505050565b600080600061297d846001600160401b0316613714565b925092509250600060228360ff168154811061299b5761299b6153f4565b90600052602060002090602091828204019190069054906101000a900460ff16158015612a685750600a601d600060ff16815481106129dc576129dc6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16612a0a9190615691565b61ffff16601f600060ff1681548110612a2557612a256153f4565b906000526020600020018460ff1681548110612a4357612a436153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1610155b8015612a855750612a7a6020866156a6565b6001600160401b0316155b8015612a915750466001145b9050612a9b6149b8565b60ff80861660208301528481166040830152831660608201528115158152612bbd612ad46010661fffffffffffff600b8a901c166156a6565b60218054600090612ae757612ae76153f4565b906000526020600020018760ff1681548110612b0557612b056153f4565b90600052602060002001600060ff1681548110612b2457612b246153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600060ff1681548110612b5b57612b5b6153f4565b906000526020600020018860ff1681548110612b7957612b796153f4565b90600052602060002001600160ff1681548110612b9857612b986153f4565b90600052602060002090602091828204019190069054906101000a900460ff16613adb565b60a082015160ff9091169052612c6d612be460106601ffffffffffff600f8a901c166156a6565b602180546001908110612bf957612bf96153f4565b906000526020600020018760ff1681548110612c1757612c176153f4565b90600052602060002001600060ff1681548110612c3657612c366153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600160ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116602090910152612d20612c976010651fffffffffff60138a901c166156a6565b602180546002908110612cac57612cac6153f4565b906000526020600020018760ff1681548110612cca57612cca6153f4565b90600052602060002001600060ff1681548110612ce957612ce96153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600260ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116604090910152612dd3612d4a60106501ffffffffff60178a901c166156a6565b602180546003908110612d5f57612d5f6153f4565b906000526020600020018760ff1681548110612d7d57612d7d6153f4565b90600052602060002001600060ff1681548110612d9c57612d9c6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600360ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116606090910152612e85612dfc6010641fffffffff601b8a901c166156a6565b602180546004908110612e1157612e116153f4565b906000526020600020018760ff1681548110612e2f57612e2f6153f4565b90600052602060002001600060ff1681548110612e4e57612e4e6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600460ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116608090910152612f37612eae60106401ffffffff601f8a901c166156a6565b602180546005908110612ec357612ec36153f4565b906000526020600020018760ff1681548110612ee157612ee16153f4565b90600052602060002001600060ff1681548110612f0057612f006153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600560ff1681548110612b5b57612b5b6153f4565b60a08083015160ff909216910152612fe6612f5d6010631fffffff60238a901c166156a6565b602180546006908110612f7257612f726153f4565b906000526020600020018760ff1681548110612f9057612f906153f4565b90600052602060002001600060ff1681548110612faf57612faf6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600660ff1681548110612b5b57612b5b6153f4565b60a082015160ff90911660c09091015281156130475761300581613b0a565b600160228560ff168154811061301d5761301d6153f4565b90600052602060002090602091828204019190066101000a81548160ff0219169083151502179055505b61305081613f8f565b600088815260156020526040902055601f805460ff8716908110613076576130766153f4565b906000526020600020018460ff1681548110613094576130946153f4565b906000526020600020906010918282040191900660020281819054906101000a900461ffff16809291906130c7906156cc565b91906101000a81548161ffff021916908361ffff1602179055505060208360ff16815481106130f8576130f86153f4565b906000526020600020018460ff1681548110613116576131166153f4565b906000526020600020906010918282040191900660020281819054906101000a900461ffff1680929190613149906156cc565b91906101000a81548161ffff021916908361ffff1602179055505050505050505050565b6131788484846120c3565b6131848484848461418e565b610c8c5760405162461bcd60e51b81526004016108e8906156ee565b6000818152601160205260408120805460609291906131be906151a5565b80601f01602080910402602001604051908101604052809291908181526020018280546131ea906151a5565b80156132375780601f1061320c57610100808354040283529160200191613237565b820191906000526020600020905b81548152906001019060200180831161321a57829003601f168201915b5050505050905060008151111561324e5792915050565b6000600e805461325d906151a5565b9050116132795760405180602001604052806000815250610b64565b600e6132848461429f565b600f604051602001613298939291906157da565b6040516020818303038152906040529392505050565b6010546000906001600160a01b0316156133565760105460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c45527919060240160206040518083038186803b15801561330c57600080fd5b505afa158015613320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133449190615802565b6001600160a01b031614915050610828565b50600092915050565b6060600061336e8360026152b2565b613379906002615572565b6001600160401b0381111561339057613390614cc7565b6040519080825280601f01601f1916602001820160405280156133ba576020820181803683370190505b509050600360fc1b816000815181106133d5576133d56153f4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613404576134046153f4565b60200101906001600160f81b031916908160001a90535060006134288460026152b2565b613433906001615572565b90505b60018111156134ab576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613467576134676153f4565b1a60f81b82828151811061347d5761347d6153f4565b60200101906001600160f81b031916908160001a90535060049490941c936134a48161581f565b9050613436565b508315610b645760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108e8565b606060005b60208160ff161080156135335750828160ff1660208110613522576135226153f4565b1a60f81b6001600160f81b03191615155b1561354a578061354281615836565b9150506134ff565b60008160ff166001600160401b0381111561356757613567614cc7565b6040519080825280601f01601f191660200182016040528015613591576020820181803683370190505b509050600091505b60208260ff161080156135cd5750838260ff16602081106135bc576135bc6153f4565b1a60f81b6001600160f81b03191615155b15610b6457838260ff16602081106135e7576135e76153f4565b1a60f81b818360ff1681518110613600576136006153f4565b60200101906001600160f81b031916908160001a9053508161362181615836565b925050613599565b6001600160a01b0383166136845761367f81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6136a7565b816001600160a01b0316836001600160a01b0316146136a7576136a7838261439c565b6001600160a01b0382166136be57610a2381614439565b826001600160a01b0316826001600160a01b031614610a2357610a2382826144e8565b6136eb838361452c565b6136f8600084848461418e565b610a235760405162461bcd60e51b81526004016108e8906156ee565b60008080600a6137256020866153e0565b10613733576002925061374a565b60036137406020866153e0565b1061374a57600192505b601c8360ff1681548110613760576137606153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1661378e60ff851661466d565b61ffff1614156137b65760036137a5846001615856565b6137af919061587b565b925061374a565b60ff83161580156137c75750466001145b801561382957506001601c600060ff16815481106137e7576137e76153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16613815919061589d565b61ffff16613823600061466d565b61ffff16145b1561383757600491506138fe565b613844600585811c6153e0565b91505b601d8360ff168154811061385d5761385d6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff16601f8460ff168154811061389b5761389b6153f4565b906000526020600020018360ff16815481106138b9576138b96153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff16106138fe5760056138ed836001615856565b6138f7919061587b565b9150613847565b60ff8316600114156139e45761392561391c6002600887901c6153e0565b60016002613adb565b90505b601e8360ff168154811061393e5761393e6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff1660208260ff168154811061397c5761397c6153f4565b906000526020600020018360ff168154811061399a5761399a6153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1614156139df576139cd60028261587b565b6139d8906001615856565b9050613928565b613ad4565b60ff831660021415613ad457613a0b613a026005600887901c6153e0565b60036007613adb565b90505b601e8360ff1681548110613a2457613a246153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff1660208260ff1681548110613a6257613a626153f4565b906000526020600020018360ff1681548110613a8057613a806153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff161480613ab1575060038160ff16105b15613ad4576008613ac3826001615856565b613acd919061587b565b9050613a0e565b9193909250565b600080613ae884846158b8565b613af3906001615856565b905083613b00828761587b565b61295d9190615856565b60218054600090613b1d57613b1d6153f4565b90600052602060002001600060ff1681548110613b3c57613b3c6153f4565b90600052602060002001600160ff1681548110613b5b57613b5b6153f4565b60009182526020918290209181049091015460a08301515160ff601f9093166101000a909104821691161015613ba95760018160a00151600001818151613ba29190615856565b60ff169052505b602180546001908110613bbe57613bbe6153f4565b90600052602060002001600060ff1681548110613bdd57613bdd6153f4565b90600052602060002001600160ff1681548110613bfc57613bfc6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516020015160ff161015613c4f5760018160a00151602001818151613c489190615856565b60ff169052505b602180546002908110613c6457613c646153f4565b90600052602060002001600060ff1681548110613c8357613c836153f4565b90600052602060002001600160ff1681548110613ca257613ca26153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516040015160ff161015613cf55760018160a00151604001818151613cee9190615856565b60ff169052505b602180546003908110613d0a57613d0a6153f4565b90600052602060002001600060ff1681548110613d2957613d296153f4565b90600052602060002001600160ff1681548110613d4857613d486153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516060015160ff161015613d9b5760018160a00151606001818151613d949190615856565b60ff169052505b602180546004908110613db057613db06153f4565b90600052602060002001600060ff1681548110613dcf57613dcf6153f4565b90600052602060002001600160ff1681548110613dee57613dee6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516080015160ff161015613e415760018160a00151608001818151613e3a9190615856565b60ff169052505b602180546005908110613e5657613e566153f4565b90600052602060002001600060ff1681548110613e7557613e756153f4565b90600052602060002001600160ff1681548110613e9457613e946153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a0015160a0015160ff161015613ee75760018160a0015160a001818151613ee09190615856565b60ff169052505b602180546006908110613efc57613efc6153f4565b90600052602060002001600060ff1681548110613f1b57613f1b6153f4565b90600052602060002001600160ff1681548110613f3a57613f3a6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a0015160c0015160ff161015610d715760018160a0015160c001818151613f869190615856565b60ff1690525050565b6000816080015160c0015160ff1681613fa89190615572565b608083015160a0015160089190911b9150613fc69060ff1682615572565b608080840151015160089190911b9150613fe39060ff1682615572565b60808301516060015160089190911b91506140019060ff1682615572565b60808301516040015160089190911b915061401f9060ff1682615572565b60808301516020015160089190911b915061403d9060ff1682615572565b60808301515160089190911b91506140589060ff1682615572565b60a083015160c0015160049190911b91506140769060ff1682615572565b60a080840151015160049190911b91506140939060ff1682615572565b60a08301516080015160049190911b91506140b19060ff1682615572565b60a08301516060015160049190911b91506140cf9060ff1682615572565b60a08301516040015160049190911b91506140ed9060ff1682615572565b60a08301516020015160049190911b915061410b9060ff1682615572565b60a08301515160049190911b91506141269060ff1682615572565b606083015160039190911b91506141409060ff1682615572565b604083015160039190911b915061415a9060ff1682615572565b602083015160029190911b91506141749060ff1682615572565b82519091501561418957610828600382615572565b919050565b60006141a2846001600160a01b0316614836565b1561429757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906141d99033908990889088906004016158db565b602060405180830381600087803b1580156141f357600080fd5b505af1925050508015614223575060408051601f3d908101601f1916820190925261422091810190615918565b60015b61427d573d808015614251576040519150601f19603f3d011682016040523d82523d6000602084013e614256565b606091505b5080516142755760405162461bcd60e51b81526004016108e8906156ee565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612032565b506001612032565b6060816142c35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156142ed57806142d781615423565b91506142e69050600a8361558a565b91506142c7565b6000816001600160401b0381111561430757614307614cc7565b6040519080825280601f01601f191660200182016040528015614331576020820181803683370190505b5090505b84156120325761434660018361567a565b9150614353600a866153e0565b61435e906030615572565b60f81b818381518110614373576143736153f4565b60200101906001600160f81b031916908160001a905350614395600a8661558a565b9450614335565b600060016143a9846112ea565b6143b3919061567a565b600083815260086020526040902054909150808214614406576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061444b9060019061567a565b6000838152600a602052604081205460098054939450909284908110614473576144736153f4565b906000526020600020015490508060098381548110614494576144946153f4565b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806144cc576144cc615935565b6001900381819060005260206000200160009055905550505050565b60006144f3836112ea565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8061453681611dba565b156145835760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108e8565b6001600160a01b0383166145d95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108e8565b6145e560008484613629565b6001600160a01b038316600090815260046020526040812080546001929061460e908490615572565b909155505060008281526003602052604080822080546001600160a01b0319166001600160a01b03871690811790915590518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b6000601f8281548110614682576146826153f4565b9060005260206000200160048154811061469e5761469e6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f83815481106146d5576146d56153f4565b906000526020600020016003815481106146f1576146f16153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f8481548110614728576147286153f4565b90600052602060002001600281548110614744576147446153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f858154811061477b5761477b6153f4565b90600052602060002001600181548110614797576147976153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f86815481106147ce576147ce6153f4565b906000526020600020016000815481106147ea576147ea6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16614818919061594b565b614822919061594b565b61482c919061594b565b610828919061594b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612032575050151592915050565b82805461487b906151a5565b90600052602060002090601f01602090048101928261489d57600085556148e3565b82601f106148b65782800160ff198235161785556148e3565b828001600101855582156148e3579182015b828111156148e35782358255916020019190600101906148c8565b50611266929150614a53565b82805482825590600052602060002090600f016010900481019282156148e35791602002820160005b8382111561495857835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302614918565b80156149865782816101000a81549061ffff0219169055600201602081600101049283019260010302614958565b5050611266929150614a53565b508054600082556003016004900490600052602060002090810190610d719190614a53565b6040805160c08082018352600080835260208084018290528385018290526060808501839052855160e081018752838152918201839052948101829052938401819052608084810182905260a085018290529184015290919082019081526040805160e08101825260008082526020828101829052928201819052606082018190526080820181905260a0820181905260c082015291015290565b5b808211156112665760008155600101614a54565b6001600160e01b031981168114610d7157600080fd5b600060208284031215614a9057600080fd5b8135610b6481614a68565b60005b83811015614ab6578181015183820152602001614a9e565b83811115610c8c5750506000910152565b60008151808452614adf816020860160208601614a9b565b601f01601f19169290920160200192915050565b602081526000610b646020830184614ac7565b600060208284031215614b1857600080fd5b5035919050565b6001600160a01b0381168114610d7157600080fd5b60008060408385031215614b4757600080fd5b8235614b5281614b1f565b946020939093013593505050565b60008083601f840112614b7257600080fd5b5081356001600160401b03811115614b8957600080fd5b602083019150836020828501011115614ba157600080fd5b9250929050565b600080600060408486031215614bbd57600080fd5b8335925060208401356001600160401b03811115614bda57600080fd5b614be686828701614b60565b9497909650939450505050565b600080600060608486031215614c0857600080fd5b8335614c1381614b1f565b92506020840135614c2381614b1f565b929592945050506040919091013590565b60008060408385031215614c4757600080fd5b823591506020830135614c5981614b1f565b809150509250929050565b60008060208385031215614c7757600080fd5b82356001600160401b03811115614c8d57600080fd5b614c9985828601614b60565b90969095509350505050565b60008060408385031215614cb857600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d0557614d05614cc7565b604052919050565b803561ffff8116811461418957600080fd5b600082601f830112614d3057600080fd5b813560206001600160401b03821115614d4b57614d4b614cc7565b8160051b614d5a828201614cdd565b9283528481018201928281019087851115614d7457600080fd5b83870192505b84831015614d9a57614d8b83614d0d565b82529183019190830190614d7a565b979650505050505050565b600080600060608486031215614dba57600080fd5b83356001600160401b0380821115614dd157600080fd5b614ddd87838801614d1f565b94506020860135915080821115614df357600080fd5b614dff87838801614d1f565b93506040860135915080821115614e1557600080fd5b50614e2286828701614d1f565b9150509250925092565b60008060408385031215614e3f57600080fd5b614e4883614d0d565b9150614e5660208401614d0d565b90509250929050565b600060208284031215614e7157600080fd5b8135610b6481614b1f565b60ff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c0840152505050565b60006102408201905082511515825260ff602084015116602083015260ff604084015116604083015260ff60608401511660608301526080830151614f196080840182614e7c565b5060a08301516120bc610160840182614e7c565b60008060208385031215614f4057600080fd5b82356001600160401b0380821115614f5757600080fd5b818501915085601f830112614f6b57600080fd5b813581811115614f7a57600080fd5b8660208260051b8501011115614f8f57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015614fd957835183529284019291840191600101614fbd565b50909695505050505050565b600060208284031215614ff757600080fd5b610b6482614d0d565b6000806000806060858703121561501657600080fd5b843561502181614b1f565b93506020850135925060408501356001600160401b0381111561504357600080fd5b61504f87828801614b60565b95989497509550505050565b8015158114610d7157600080fd5b6000806040838503121561507c57600080fd5b823561508781614b1f565b91506020830135614c598161505b565b600080600080608085870312156150ad57600080fd5b84356150b881614b1f565b93506020858101356150c981614b1f565b93506040860135925060608601356001600160401b03808211156150ec57600080fd5b818801915088601f83011261510057600080fd5b81358181111561511257615112614cc7565b615124601f8201601f19168501614cdd565b9150808252898482850101111561513a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561516c57600080fd5b8135610b648161505b565b6000806040838503121561518a57600080fd5b823561519581614b1f565b91506020830135614c5981614b1f565b600181811c908216806151b957607f821691505b6020821081141561090c57634e487b7160e01b600052602260045260246000fd5b60208082526023908201527f4552433732313a20717565727920666f72206e6f6e6578697374656e7420746f60408201526235b2b760e91b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156152cc576152cc61529c565b500290565b600181815b8085111561530c5781600019048211156152f2576152f261529c565b808516156152ff57918102915b93841c93908002906152d6565b509250929050565b60008261532357506001610828565b8161533057506000610828565b816001811461534657600281146153505761536c565b6001915050610828565b60ff8411156153615761536161529c565b50506001821b610828565b5060208310610133831016604e8410600b841016171561538f575081810a610828565b61539983836152d1565b80600019048211156153ad576153ad61529c565b029392505050565b6000610b646001600160401b03841683615314565b634e487b7160e01b600052601260045260246000fd5b6000826153ef576153ef6153ca565b500690565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561541c57600080fd5b5051919050565b60006000198214156154375761543761529c565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561549357603f19888603018452615481858351614ac7565b94509285019290850190600101615465565b5092979650505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60006001600160401b03808416806154e4576154e46153ca565b92169190910492915050565b60006001600160401b03808316818516818304811182151516156155165761551661529c565b02949350505050565b60006001600160401b038083168185168083038211156155415761554161529c565b01949350505050565b60006001600160401b038381169083168181101561556a5761556a61529c565b039392505050565b600082198211156155855761558561529c565b500190565b600082615599576155996153ca565b500490565b60006001600160401b038216806155b7576155b761529c565b6000190192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155f9816017850160208801614a9b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161562a816028840160208801614a9b565b01602801949350505050565b60018060a01b038416815282602082015260606040820152600061295d6060830184614ac7565b60006020828403121561566f57600080fd5b8151610b648161505b565b60008282101561568c5761568c61529c565b500390565b600061ffff808416806154e4576154e46153ca565b60006001600160401b03808416806156c0576156c06153ca565b92169190910692915050565b600061ffff808316818114156156e4576156e461529c565b6001019392505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8054600090600181811c908083168061575a57607f831692505b602080841082141561577c57634e487b7160e01b600052602260045260246000fd5b81801561579057600181146157a1576157ce565b60ff198616895284890196506157ce565b60008881526020902060005b868110156157c65781548b8201529085019083016157ad565b505084890196505b50505050505092915050565b60006157e68286615740565b84516157f6818360208901614a9b565b614d9a81830186615740565b60006020828403121561581457600080fd5b8151610b6481614b1f565b60008161582e5761582e61529c565b506000190190565b600060ff821660ff81141561584d5761584d61529c565b60010192915050565b600060ff821660ff84168060ff038211156158735761587361529c565b019392505050565b600060ff83168061588e5761588e6153ca565b8060ff84160691505092915050565b600061ffff8381169083168181101561556a5761556a61529c565b600060ff821660ff8416808210156158d2576158d261529c565b90039392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061590e90830184614ac7565b9695505050505050565b60006020828403121561592a57600080fd5b8151610b6481614a68565b634e487b7160e01b600052603160045260246000fd5b600061ffff8083168185168083038211156155415761554161529c56fea26469706673582212206bfb5b7bac92c329d4ff1a16e3b8319daed7e0d2d11befc7089de71145affd9664736f6c63430008090033000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103995760003560e01c806364cb9782116101e957806395d89b411161010f578063dbaa56fb116100ad578063ec87621c1161007c578063ec87621c146107b0578063f0bd87cc146107c1578063f5b541a6146107d6578063f95708c1146107e857600080fd5b8063dbaa56fb14610772578063e63ab1e914610785578063e8a3d48514610795578063e985e9c51461079d57600080fd5b8063b88d4fde116100e9578063b88d4fde14610726578063c87b56dd14610739578063d26ea6c01461074c578063d547741f1461075f57600080fd5b806395d89b41146106f8578063a22cb46514610700578063a75a90491461071357600080fd5b80637e8c7f081161018757806391d148541161015657806391d14854146106ac578063938e3d7b146106bf57806394985ddd146106d257806394d008ef146106e557600080fd5b80637e8c7f08146106635780638456cb59146106715780638462151c146106795780638fe226511461069957600080fd5b8063733bc7ea116101c3578063733bc7ea1461063157806375b238fc1461063957806379e1e68b146106485780637e4921d51461065b57600080fd5b806364cb9782146105f65780636be63669146105fe57806370a082311461061e57600080fd5b806330176e13116102ce57806342966c681161026c57806360317e751161023b57806360317e75146105aa57806360affab3146105bd578063620f9c0c146105d05780636352211e146105e357600080fd5b806342966c68146105665780634c23061b146105795780634f6ccce71461058c5780635c975abb1461059f57600080fd5b80633e9564f7116102a85780633e9564f7146105255780633f4ba83a1461053857806340c10f191461054057806342842e0e1461055357600080fd5b806330176e13146104ee57806336568abe146105015780633d75e4511461051457600080fd5b80631b267eab1161033b57806327ae3a971161031557806327ae3a97146104a25780632d9f6154146104b55780632f2ff15d146104c85780632f745c59146104db57600080fd5b80631b267eab1461045957806323b872dd1461046c578063248a9ca31461047f57600080fd5b8063095ea7b311610377578063095ea7b3146104065780631241761b1461041b57806318160ddd1461043b57806318b8206f1461045157600080fd5b806301ffc9a71461039e57806306fdde03146103c6578063081812fc146103db575b600080fd5b6103b16103ac366004614a7e565b6107f0565b60405190151581526020015b60405180910390f35b6103ce61082e565b6040516103bd9190614af3565b6103ee6103e9366004614b06565b6108c0565b6040516001600160a01b0390911681526020016103bd565b610419610414366004614b34565b610912565b005b610423605c81565b6040516001600160401b0390911681526020016103bd565b610443610a28565b6040519081526020016103bd565b610419610a38565b610419610467366004614ba8565b610a8e565b61041961047a366004614bf3565b610ac1565b61044361048d366004614b06565b6000908152600b602052604090206001015490565b6104436104b0366004614b06565b610af2565b6103ce6104c3366004614b06565b610b6b565b6104196104d6366004614c34565b610bb1565b6104436104e9366004614b34565b610bd7565b6104196104fc366004614c64565b610c6d565b61041961050f366004614c34565b610c92565b61044366213934b233b2b960c91b81565b610419610533366004614c64565b610d0c565b610419610d2b565b61041961054e366004614b34565b610d74565b610419610561366004614bf3565b610dd1565b610419610574366004614b06565b610dec565b610419610587366004614ca5565b610e61565b61044361059a366004614b06565b610f9b565b600c5460ff166103b1565b6104196105b8366004614da5565b61102e565b6104196105cb366004614e2c565b6110fc565b6104196105de366004614e5f565b611172565b6103ee6105f1366004614b06565b6111fd565b610423611242565b61061161060c366004614b06565b61126a565b6040516103bd9190614ed1565b61044361062c366004614e5f565b6112ea565b610423602481565b6104436420b236b4b760d91b81565b6103ce610656366004614f2d565b611371565b610423611449565b61044363149bdbdd60e21b81565b610419611458565b61068c610687366004614e5f565b61149f565b6040516103bd9190614fa1565b6104196106a7366004614fe5565b611540565b6103b16106ba366004614c34565b61184b565b6104196106cd366004614c64565b611876565b6104196106e0366004614ca5565b611895565b6104196106f3366004615000565b611917565b6103ce6119c0565b61041961070e366004615069565b6119cf565b610419610721366004614b34565b6119da565b610419610734366004615097565b611c7a565b6103ce610747366004614b06565b611cab565b61041961075a366004614e5f565b611cdc565b61041961076d366004614c34565b611d12565b61041961078036600461515a565b611d38565b610443652830bab9b2b960d11b81565b6103ce611d5f565b6103b16107ab366004615177565b611d6e565b6104436626b0b730b3b2b960c91b81565b6104436a2234b9ba3934b13aba37b960a91b81565b6104436727b832b930ba37b960c11b81565b610423611dae565b6001600160e01b0319811660009081526020819052604081205460ff168061082857506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606001805461083d906151a5565b80601f0160208091040260200160405190810160405280929190818152602001828054610869906151a5565b80156108b65780601f1061088b576101008083540402835291602001916108b6565b820191906000526020600020905b81548152906001019060200180831161089957829003601f168201915b5050505050905090565b6000816108cc81611dba565b6108f15760405162461bcd60e51b81526004016108e8906151da565b60405180910390fd5b6000838152600560205260409020546001600160a01b031691505b50919050565b600061091d826111fd565b9050806001600160a01b0316836001600160a01b0316141561098b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108e8565b336001600160a01b03821614806109a757506109a78133611d6e565b610a195760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108e8565b610a238383611dd7565b505050565b6000610a3360095490565b905090565b600c5460ff16610a5a5760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b610a6d8133611e45565b610a7b601354601454611ea7565b50610a8a601354601454611ea7565b5050565b6420b236b4b760d91b610aa18133611e45565b6000848152601160205260409020610aba90848461486f565b5050505050565b610acb338261203a565b610ae75760405162461bcd60e51b81526004016108e89061524b565b610a238383836120c3565b600081610afe81611dba565b610b1a5760405162461bcd60e51b81526004016108e8906151da565b60235460ff16610b3857600083815260156020526040902054610b64565b6000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed545b9392505050565b601854600082815260156020526040902054606091610b89916152b2565b604051602001610b9b91815260200190565b6040516020818303038152906040529050919050565b6000828152600b6020526040902060010154610bcd8133611e45565b610a23838361226a565b6000610be2836112ea565b8210610c445760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108e8565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6420b236b4b760d91b610c808133611e45565b610c8c600e848461486f565b50505050565b6001600160a01b0381163314610d025760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108e8565b610a8a82826122f0565b6420b236b4b760d91b610d1f8133611e45565b610c8c600f848461486f565b652830bab9b2b960d11b610d3f8133611e45565b600c5460ff16610d615760405162461bcd60e51b81526004016108e89061521d565b610d69612357565b610d71612402565b50565b66213934b233b2b960c91b610d898133611e45565b60405162461bcd60e51b815260206004820152601b60248201527f557365206d696e742077697468206461746120617267756d656e74000000000060448201526064016108e8565b610a2383838360405180602001604052806000815250611c7a565b66213934b233b2b960c91b610e018133611e45565b610e0c335b8361203a565b610e585760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656460448201526064016108e8565b610a8a8261246e565b81610e6b81611dba565b610e875760405162461bcd60e51b81526004016108e8906151da565b6727b832b930ba37b960c11b610e9d8133611e45565b600084815260156020526040902054610eb8602460026153b5565b610ecb906001600160401b0316856153e0565b610ed7602460026153b5565b610eea906001600160401b0316836153e0565b14610f375760405162461bcd60e51b815260206004820152601d60248201527f496e626f726e20706172616d657465727320776173206368616e67656400000060448201526064016108e8565b6000858152601560205260409020849055847f33d49995976956f0060b8535a0342cbd3d34e8bf3674f285d4d19a32f2107e678286336040805193845260208401929092526001600160a01b03169082015260600160405180910390a25050505050565b6000610fa660095490565b82106110095760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108e8565b6009828154811061101c5761101c6153f4565b90600052602060002001549050919050565b600c5460ff166110505760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6110638133611e45565b83516003148015611075575082516003145b8015611082575081516003145b6110c15760405162461bcd60e51b815260206004820152601060248201526f496e636f7272656374206c696d69747360801b60448201526064016108e8565b83516110d490601c9060208701906148ef565b5082516110e890601d9060208601906148ef565b508151610aba90601e9060208501906148ef565b600c5460ff1661111e5760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6111318133611e45565b601b805461ffff848116620100000263ffffffff199092169086161717905561115c601a6000614993565b50506019805467ffffffffffffffff1916905550565b6420b236b4b760d91b6111858133611e45565b816001600160a01b0316636896c6ca6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111be57600080fd5b505afa1580156111d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f6919061540a565b6018555050565b60008161120981611dba565b6112255760405162461bcd60e51b81526004016108e8906151da565b50506000908152600360205260409020546001600160a01b031690565b60006420b236b4b760d91b6112578133611e45565b6019546001600160401b031691505b5090565b6112726149b8565b8161127c81611dba565b6112985760405162461bcd60e51b81526004016108e8906151da565b602354610b649060ff166112ba57600084815260156020526040902054612515565b6000805260156020527fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed54612515565b60006001600160a01b0382166113555760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108e8565b506001600160a01b031660009081526004602052604090205490565b60606000826001600160401b0381111561138d5761138d614cc7565b6040519080825280602002602001820160405280156113c057816020015b60608152602001906001900390816113ab5790505b50905060005b8381101561141f576113ef8585838181106113e3576113e36153f4565b90506020020135610b6b565b828281518110611401576114016153f4565b6020026020010181905250808061141790615423565b9150506113c6565b5080604051602001611431919061543e565b60405160208183030381529060405291505092915050565b611455605c60026153b5565b81565b652830bab9b2b960d11b61146c8133611e45565b600c5460ff161561148f5760405162461bcd60e51b81526004016108e8906154a0565b611497612723565b610d7161277e565b606060006114ac836112ea565b90506000816001600160401b038111156114c8576114c8614cc7565b6040519080825280602002602001820160405280156114f1578160200160208202803683370190505b50905060005b82811015611538576115098582610bd7565b82828151811061151b5761151b6153f4565b60209081029190910101528061153081615423565b9150506114f7565b509392505050565b600c5460ff166115625760405162461bcd60e51b81526004016108e89061521d565b6420b236b4b760d91b6115758133611e45565b6000601654116115c75760405162461bcd60e51b815260206004820152601d60248201527f496e697469616c2072616e646f6d6e657373206973206e6f742073657400000060448201526064016108e8565b601b5462010000900461ffff166116205760405162461bcd60e51b815260206004820152601c60248201527f436861696e20706172616d657465727320617265206e6f74207365740000000060448201526064016108e8565b600061162f60286101006154ca565b61163d9061ffff85166154f0565b601b5460195491925062010000900461ffff16906116659083906001600160401b031661551f565b6001600160401b0316111561169a57601954601b54611697916001600160401b03169062010000900461ffff1661554a565b90505b6000805b826001600160401b0316811015611802576116bc60286101006154ca565b6116cf906001600160401b0316826153e0565b61170f5761170c60165482604080516020808201949094524281830152606080820193909352815180820390930183526080019052805191012090565b91505b601b54601954601a9161ffff16906117319084906001600160401b0316615572565b61173b9190615572565b611747602860026153b5565b6001600160401b031661175a91906152b2565b611766602860026153b5565b6001600160401b031661177c60286101006154ca565b61178f906001600160401b0316856153e0565b61179a9060286152b2565b85901c6117a791906153e0565b6117b19190615572565b8154600181018355600092835260209092206004830401805460039093166008026101000a6001600160401b03818102199094169290931692909202179055806117fa81615423565b91505061169e565b50601980548391906000906118219084906001600160401b031661551f565b92506101000a8154816001600160401b0302191690836001600160401b0316021790555050505050565b6000918252600b602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6420b236b4b760d91b6118898133611e45565b610c8c600d848461486f565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952161461190d5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016108e8565b610a8a82826127d6565b8261192181611dba565b1561196e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108e8565b66213934b233b2b960c91b6119838133611e45565b61198d86866127f0565b60185461199c84860186614b06565b6119a6919061558a565b600095865260156020526040909520949094555050505050565b60606002805461083d906151a5565b610a8a33838361280a565b600c5460ff16156119fd5760405162461bcd60e51b81526004016108e8906154a0565b6a2234b9ba3934b13aba37b960a91b611a168133611e45565b6019546001600160401b0316821115611a6d5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820756e6f776e656420776f6c76657360381b60448201526064016108e8565b60005b82811015610c8c576000611aaf611a86836128d9565b601954600090611aa1906001906001600160401b031661554a565b6001600160401b031661292e565b90506000601a8281548110611ac657611ac66153f4565b6000918252602090912060048204015460195460039092166008026101000a90046001600160401b03818116935060289190911c62ffffff1691601a91611b10916001911661554a565b6001600160401b031681548110611b2957611b296153f4565b90600052602060002090600491828204019190066008029054906101000a90046001600160401b0316601a8481548110611b6557611b656153f4565b90600052602060002090600491828204019190066008026101000a8154816001600160401b0302191690836001600160401b03160217905550601a6001601960009054906101000a90046001600160401b0316611bc2919061554a565b6001600160401b031681548110611bdb57611bdb6153f4565b600091825260208220600482040180546001600160401b0360086003909416939093026101000a8302191690556019805490911691611c198361559e565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050611c5187826001600160401b03166127f0565b611c64816001600160401b031683612966565b5050508080611c7290615423565b915050611a70565b611c8333610e06565b611c9f5760405162461bcd60e51b81526004016108e89061524b565b610c8c8484848461316d565b606081611cb781611dba565b611cd35760405162461bcd60e51b81526004016108e8906151da565b610b64836131a0565b6420b236b4b760d91b611cef8133611e45565b50601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600b6020526040902060010154611d2e8133611e45565b610a2383836122f0565b6420b236b4b760d91b611d4b8133611e45565b506023805460ff1916911515919091179055565b6060600d805461083d906151a5565b6000611d7a83836132ae565b80610b6457506001600160a01b0380841660009081526006602090815260408083209386168352929052205460ff16610b64565b611455602460026153b5565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e0c826111fd565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b611e4f828261184b565b610a8a57611e67816001600160a01b0316601461335f565b611e70836134fa565b604051602001611e819291906155c1565b60408051601f198184030181529082905262461bcd60e51b82526108e891600401614af3565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611f17929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611f4493929190615636565b602060405180830381600087803b158015611f5e57600080fd5b505af1158015611f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f96919061565d565b50600083815260126020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611ff2906001615572565b6000858152601260205260409020556120328482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b60008161204681611dba565b6120625760405162461bcd60e51b81526004016108e8906151da565b600061206d846111fd565b9050806001600160a01b0316856001600160a01b031614806120a85750846001600160a01b031661209d856108c0565b6001600160a01b0316145b806120b857506120b88186611d6e565b9250505b5092915050565b826001600160a01b03166120d6826111fd565b6001600160a01b03161461213a5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108e8565b6001600160a01b03821661219c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108e8565b6121a7838383613629565b6121b2600082611dd7565b6001600160a01b03831660009081526004602052604081208054600192906121db90849061567a565b90915550506001600160a01b0382166000908152600460205260408120805460019290612209908490615572565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b612274828261184b565b610a8a576000828152600b602090815260408083206001600160a01b03851684529091529020805460ff191660011790556122ac3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6122fa828261184b565b15610a8a576000828152600b602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b601b546019546201000090910461ffff166001600160401b03909116146123bc5760405162461bcd60e51b81526020600482015260196024820152784e6f7420656e6f75676820756e6f776e656420776f6c76657360381b60448201526064016108e8565b601c546124005760405162461bcd60e51b8152602060048201526012602482015271131a5b5a5d1cc8185c99481b9bdd081cd95d60721b60448201526064016108e8565b565b600c5460ff166124245760405162461bcd60e51b81526004016108e89061521d565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612479826111fd565b905061248781600084613629565b612492600083611dd7565b6001600160a01b03811660009081526004602052604081208054600192906124bb90849061567a565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b61251d6149b8565b600361252a6004846153e0565b61253491906153e0565b60ff16602082015261254b6008600284901c6153e0565b60ff1660408201526125626008600584901c6153e0565b60ff1660608201526125756004836153e0565b60031481526125896010600884901c6153e0565b60a082015160ff90911690526125a46010600c84901c6153e0565b60a082015160ff9091166020909101526125c1601083811c6153e0565b60a082015160ff9091166040909101526125e06010601484901c6153e0565b60a082015160ff9091166060909101526125ff6010601884901c6153e0565b60a082015160ff90911660809091015261261e6010601c84901c6153e0565b60a08083015160ff90921691015261263b6010602084901c6153e0565b60a082015160ff90911660c09091015261265a6010602484901c6153e0565b608082015160ff90911690526126756010602c84901c6153e0565b608082015160ff9091166020909101526126946010603484901c6153e0565b608082015160ff9091166040909101526126b36010603c84901c6153e0565b608082015160ff9091166060909101526126d26010604484901c6153e0565b60808083015160ff9092169101526126ef6010604c84901c6153e0565b608082015160ff90911660a09091015261270e6010605484901c6153e0565b608082015160ff90911660c090910152919050565b60405162461bcd60e51b815260206004820152602a60248201527f4f6e636520756e6c656173686564204645415220576f6c662063616e6e6f74206044820152691899481cdd1bdc1c195960b21b60648201526084016108e8565b600c5460ff16156127a15760405162461bcd60e51b81526004016108e8906154a0565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586124513390565b6017546127e35760175550565b601654610a8a5760165550565b610a8a8282604051806020016040528060008152506136e1565b816001600160a01b0316836001600160a01b0316141561286c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108e8565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b601b5460175460009162010000900461ffff16906129249084604080516020808201949094524281830152606080820193909352815180820390930183526080019052805191012090565b61082891906153e0565b60008061293b848461567a565b612946906001615572565b90508361295382876153e0565b61295d9190615572565b95945050505050565b600080600061297d846001600160401b0316613714565b925092509250600060228360ff168154811061299b5761299b6153f4565b90600052602060002090602091828204019190069054906101000a900460ff16158015612a685750600a601d600060ff16815481106129dc576129dc6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16612a0a9190615691565b61ffff16601f600060ff1681548110612a2557612a256153f4565b906000526020600020018460ff1681548110612a4357612a436153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1610155b8015612a855750612a7a6020866156a6565b6001600160401b0316155b8015612a915750466001145b9050612a9b6149b8565b60ff80861660208301528481166040830152831660608201528115158152612bbd612ad46010661fffffffffffff600b8a901c166156a6565b60218054600090612ae757612ae76153f4565b906000526020600020018760ff1681548110612b0557612b056153f4565b90600052602060002001600060ff1681548110612b2457612b246153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600060ff1681548110612b5b57612b5b6153f4565b906000526020600020018860ff1681548110612b7957612b796153f4565b90600052602060002001600160ff1681548110612b9857612b986153f4565b90600052602060002090602091828204019190069054906101000a900460ff16613adb565b60a082015160ff9091169052612c6d612be460106601ffffffffffff600f8a901c166156a6565b602180546001908110612bf957612bf96153f4565b906000526020600020018760ff1681548110612c1757612c176153f4565b90600052602060002001600060ff1681548110612c3657612c366153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600160ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116602090910152612d20612c976010651fffffffffff60138a901c166156a6565b602180546002908110612cac57612cac6153f4565b906000526020600020018760ff1681548110612cca57612cca6153f4565b90600052602060002001600060ff1681548110612ce957612ce96153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600260ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116604090910152612dd3612d4a60106501ffffffffff60178a901c166156a6565b602180546003908110612d5f57612d5f6153f4565b906000526020600020018760ff1681548110612d7d57612d7d6153f4565b90600052602060002001600060ff1681548110612d9c57612d9c6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600360ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116606090910152612e85612dfc6010641fffffffff601b8a901c166156a6565b602180546004908110612e1157612e116153f4565b906000526020600020018760ff1681548110612e2f57612e2f6153f4565b90600052602060002001600060ff1681548110612e4e57612e4e6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600460ff1681548110612b5b57612b5b6153f4565b60a082015160ff909116608090910152612f37612eae60106401ffffffff601f8a901c166156a6565b602180546005908110612ec357612ec36153f4565b906000526020600020018760ff1681548110612ee157612ee16153f4565b90600052602060002001600060ff1681548110612f0057612f006153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600560ff1681548110612b5b57612b5b6153f4565b60a08083015160ff909216910152612fe6612f5d6010631fffffff60238a901c166156a6565b602180546006908110612f7257612f726153f4565b906000526020600020018760ff1681548110612f9057612f906153f4565b90600052602060002001600060ff1681548110612faf57612faf6153f4565b90600052602060002090602091828204019190069054906101000a900460ff166021600660ff1681548110612b5b57612b5b6153f4565b60a082015160ff90911660c09091015281156130475761300581613b0a565b600160228560ff168154811061301d5761301d6153f4565b90600052602060002090602091828204019190066101000a81548160ff0219169083151502179055505b61305081613f8f565b600088815260156020526040902055601f805460ff8716908110613076576130766153f4565b906000526020600020018460ff1681548110613094576130946153f4565b906000526020600020906010918282040191900660020281819054906101000a900461ffff16809291906130c7906156cc565b91906101000a81548161ffff021916908361ffff1602179055505060208360ff16815481106130f8576130f86153f4565b906000526020600020018460ff1681548110613116576131166153f4565b906000526020600020906010918282040191900660020281819054906101000a900461ffff1680929190613149906156cc565b91906101000a81548161ffff021916908361ffff1602179055505050505050505050565b6131788484846120c3565b6131848484848461418e565b610c8c5760405162461bcd60e51b81526004016108e8906156ee565b6000818152601160205260408120805460609291906131be906151a5565b80601f01602080910402602001604051908101604052809291908181526020018280546131ea906151a5565b80156132375780601f1061320c57610100808354040283529160200191613237565b820191906000526020600020905b81548152906001019060200180831161321a57829003601f168201915b5050505050905060008151111561324e5792915050565b6000600e805461325d906151a5565b9050116132795760405180602001604052806000815250610b64565b600e6132848461429f565b600f604051602001613298939291906157da565b6040516020818303038152906040529392505050565b6010546000906001600160a01b0316156133565760105460405163c455279160e01b81526001600160a01b03858116600483015291821691841690829063c45527919060240160206040518083038186803b15801561330c57600080fd5b505afa158015613320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133449190615802565b6001600160a01b031614915050610828565b50600092915050565b6060600061336e8360026152b2565b613379906002615572565b6001600160401b0381111561339057613390614cc7565b6040519080825280601f01601f1916602001820160405280156133ba576020820181803683370190505b509050600360fc1b816000815181106133d5576133d56153f4565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613404576134046153f4565b60200101906001600160f81b031916908160001a90535060006134288460026152b2565b613433906001615572565b90505b60018111156134ab576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613467576134676153f4565b1a60f81b82828151811061347d5761347d6153f4565b60200101906001600160f81b031916908160001a90535060049490941c936134a48161581f565b9050613436565b508315610b645760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108e8565b606060005b60208160ff161080156135335750828160ff1660208110613522576135226153f4565b1a60f81b6001600160f81b03191615155b1561354a578061354281615836565b9150506134ff565b60008160ff166001600160401b0381111561356757613567614cc7565b6040519080825280601f01601f191660200182016040528015613591576020820181803683370190505b509050600091505b60208260ff161080156135cd5750838260ff16602081106135bc576135bc6153f4565b1a60f81b6001600160f81b03191615155b15610b6457838260ff16602081106135e7576135e76153f4565b1a60f81b818360ff1681518110613600576136006153f4565b60200101906001600160f81b031916908160001a9053508161362181615836565b925050613599565b6001600160a01b0383166136845761367f81600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b6136a7565b816001600160a01b0316836001600160a01b0316146136a7576136a7838261439c565b6001600160a01b0382166136be57610a2381614439565b826001600160a01b0316826001600160a01b031614610a2357610a2382826144e8565b6136eb838361452c565b6136f8600084848461418e565b610a235760405162461bcd60e51b81526004016108e8906156ee565b60008080600a6137256020866153e0565b10613733576002925061374a565b60036137406020866153e0565b1061374a57600192505b601c8360ff1681548110613760576137606153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1661378e60ff851661466d565b61ffff1614156137b65760036137a5846001615856565b6137af919061587b565b925061374a565b60ff83161580156137c75750466001145b801561382957506001601c600060ff16815481106137e7576137e76153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16613815919061589d565b61ffff16613823600061466d565b61ffff16145b1561383757600491506138fe565b613844600585811c6153e0565b91505b601d8360ff168154811061385d5761385d6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff16601f8460ff168154811061389b5761389b6153f4565b906000526020600020018360ff16815481106138b9576138b96153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff16106138fe5760056138ed836001615856565b6138f7919061587b565b9150613847565b60ff8316600114156139e45761392561391c6002600887901c6153e0565b60016002613adb565b90505b601e8360ff168154811061393e5761393e6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff1660208260ff168154811061397c5761397c6153f4565b906000526020600020018360ff168154811061399a5761399a6153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff1614156139df576139cd60028261587b565b6139d8906001615856565b9050613928565b613ad4565b60ff831660021415613ad457613a0b613a026005600887901c6153e0565b60036007613adb565b90505b601e8360ff1681548110613a2457613a246153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff1660208260ff1681548110613a6257613a626153f4565b906000526020600020018360ff1681548110613a8057613a806153f4565b60009182526020909120601082040154600f9091166002026101000a900461ffff161480613ab1575060038160ff16105b15613ad4576008613ac3826001615856565b613acd919061587b565b9050613a0e565b9193909250565b600080613ae884846158b8565b613af3906001615856565b905083613b00828761587b565b61295d9190615856565b60218054600090613b1d57613b1d6153f4565b90600052602060002001600060ff1681548110613b3c57613b3c6153f4565b90600052602060002001600160ff1681548110613b5b57613b5b6153f4565b60009182526020918290209181049091015460a08301515160ff601f9093166101000a909104821691161015613ba95760018160a00151600001818151613ba29190615856565b60ff169052505b602180546001908110613bbe57613bbe6153f4565b90600052602060002001600060ff1681548110613bdd57613bdd6153f4565b90600052602060002001600160ff1681548110613bfc57613bfc6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516020015160ff161015613c4f5760018160a00151602001818151613c489190615856565b60ff169052505b602180546002908110613c6457613c646153f4565b90600052602060002001600060ff1681548110613c8357613c836153f4565b90600052602060002001600160ff1681548110613ca257613ca26153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516040015160ff161015613cf55760018160a00151604001818151613cee9190615856565b60ff169052505b602180546003908110613d0a57613d0a6153f4565b90600052602060002001600060ff1681548110613d2957613d296153f4565b90600052602060002001600160ff1681548110613d4857613d486153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516060015160ff161015613d9b5760018160a00151606001818151613d949190615856565b60ff169052505b602180546004908110613db057613db06153f4565b90600052602060002001600060ff1681548110613dcf57613dcf6153f4565b90600052602060002001600160ff1681548110613dee57613dee6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a001516080015160ff161015613e415760018160a00151608001818151613e3a9190615856565b60ff169052505b602180546005908110613e5657613e566153f4565b90600052602060002001600060ff1681548110613e7557613e756153f4565b90600052602060002001600160ff1681548110613e9457613e946153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a0015160a0015160ff161015613ee75760018160a0015160a001818151613ee09190615856565b60ff169052505b602180546006908110613efc57613efc6153f4565b90600052602060002001600060ff1681548110613f1b57613f1b6153f4565b90600052602060002001600160ff1681548110613f3a57613f3a6153f4565b90600052602060002090602091828204019190069054906101000a900460ff1660ff168160a0015160c0015160ff161015610d715760018160a0015160c001818151613f869190615856565b60ff1690525050565b6000816080015160c0015160ff1681613fa89190615572565b608083015160a0015160089190911b9150613fc69060ff1682615572565b608080840151015160089190911b9150613fe39060ff1682615572565b60808301516060015160089190911b91506140019060ff1682615572565b60808301516040015160089190911b915061401f9060ff1682615572565b60808301516020015160089190911b915061403d9060ff1682615572565b60808301515160089190911b91506140589060ff1682615572565b60a083015160c0015160049190911b91506140769060ff1682615572565b60a080840151015160049190911b91506140939060ff1682615572565b60a08301516080015160049190911b91506140b19060ff1682615572565b60a08301516060015160049190911b91506140cf9060ff1682615572565b60a08301516040015160049190911b91506140ed9060ff1682615572565b60a08301516020015160049190911b915061410b9060ff1682615572565b60a08301515160049190911b91506141269060ff1682615572565b606083015160039190911b91506141409060ff1682615572565b604083015160039190911b915061415a9060ff1682615572565b602083015160029190911b91506141749060ff1682615572565b82519091501561418957610828600382615572565b919050565b60006141a2846001600160a01b0316614836565b1561429757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906141d99033908990889088906004016158db565b602060405180830381600087803b1580156141f357600080fd5b505af1925050508015614223575060408051601f3d908101601f1916820190925261422091810190615918565b60015b61427d573d808015614251576040519150601f19603f3d011682016040523d82523d6000602084013e614256565b606091505b5080516142755760405162461bcd60e51b81526004016108e8906156ee565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612032565b506001612032565b6060816142c35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156142ed57806142d781615423565b91506142e69050600a8361558a565b91506142c7565b6000816001600160401b0381111561430757614307614cc7565b6040519080825280601f01601f191660200182016040528015614331576020820181803683370190505b5090505b84156120325761434660018361567a565b9150614353600a866153e0565b61435e906030615572565b60f81b818381518110614373576143736153f4565b60200101906001600160f81b031916908160001a905350614395600a8661558a565b9450614335565b600060016143a9846112ea565b6143b3919061567a565b600083815260086020526040902054909150808214614406576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061444b9060019061567a565b6000838152600a602052604081205460098054939450909284908110614473576144736153f4565b906000526020600020015490508060098381548110614494576144946153f4565b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806144cc576144cc615935565b6001900381819060005260206000200160009055905550505050565b60006144f3836112ea565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b8061453681611dba565b156145835760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108e8565b6001600160a01b0383166145d95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108e8565b6145e560008484613629565b6001600160a01b038316600090815260046020526040812080546001929061460e908490615572565b909155505060008281526003602052604080822080546001600160a01b0319166001600160a01b03871690811790915590518492907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4505050565b6000601f8281548110614682576146826153f4565b9060005260206000200160048154811061469e5761469e6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f83815481106146d5576146d56153f4565b906000526020600020016003815481106146f1576146f16153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f8481548110614728576147286153f4565b90600052602060002001600281548110614744576147446153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f858154811061477b5761477b6153f4565b90600052602060002001600181548110614797576147976153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16601f86815481106147ce576147ce6153f4565b906000526020600020016000815481106147ea576147ea6153f4565b90600052602060002090601091828204019190066002029054906101000a900461ffff16614818919061594b565b614822919061594b565b61482c919061594b565b610828919061594b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590612032575050151592915050565b82805461487b906151a5565b90600052602060002090601f01602090048101928261489d57600085556148e3565b82601f106148b65782800160ff198235161785556148e3565b828001600101855582156148e3579182015b828111156148e35782358255916020019190600101906148c8565b50611266929150614a53565b82805482825590600052602060002090600f016010900481019282156148e35791602002820160005b8382111561495857835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302614918565b80156149865782816101000a81549061ffff0219169055600201602081600101049283019260010302614958565b5050611266929150614a53565b508054600082556003016004900490600052602060002090810190610d719190614a53565b6040805160c08082018352600080835260208084018290528385018290526060808501839052855160e081018752838152918201839052948101829052938401819052608084810182905260a085018290529184015290919082019081526040805160e08101825260008082526020828101829052928201819052606082018190526080820181905260a0820181905260c082015291015290565b5b808211156112665760008155600101614a54565b6001600160e01b031981168114610d7157600080fd5b600060208284031215614a9057600080fd5b8135610b6481614a68565b60005b83811015614ab6578181015183820152602001614a9e565b83811115610c8c5750506000910152565b60008151808452614adf816020860160208601614a9b565b601f01601f19169290920160200192915050565b602081526000610b646020830184614ac7565b600060208284031215614b1857600080fd5b5035919050565b6001600160a01b0381168114610d7157600080fd5b60008060408385031215614b4757600080fd5b8235614b5281614b1f565b946020939093013593505050565b60008083601f840112614b7257600080fd5b5081356001600160401b03811115614b8957600080fd5b602083019150836020828501011115614ba157600080fd5b9250929050565b600080600060408486031215614bbd57600080fd5b8335925060208401356001600160401b03811115614bda57600080fd5b614be686828701614b60565b9497909650939450505050565b600080600060608486031215614c0857600080fd5b8335614c1381614b1f565b92506020840135614c2381614b1f565b929592945050506040919091013590565b60008060408385031215614c4757600080fd5b823591506020830135614c5981614b1f565b809150509250929050565b60008060208385031215614c7757600080fd5b82356001600160401b03811115614c8d57600080fd5b614c9985828601614b60565b90969095509350505050565b60008060408385031215614cb857600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715614d0557614d05614cc7565b604052919050565b803561ffff8116811461418957600080fd5b600082601f830112614d3057600080fd5b813560206001600160401b03821115614d4b57614d4b614cc7565b8160051b614d5a828201614cdd565b9283528481018201928281019087851115614d7457600080fd5b83870192505b84831015614d9a57614d8b83614d0d565b82529183019190830190614d7a565b979650505050505050565b600080600060608486031215614dba57600080fd5b83356001600160401b0380821115614dd157600080fd5b614ddd87838801614d1f565b94506020860135915080821115614df357600080fd5b614dff87838801614d1f565b93506040860135915080821115614e1557600080fd5b50614e2286828701614d1f565b9150509250925092565b60008060408385031215614e3f57600080fd5b614e4883614d0d565b9150614e5660208401614d0d565b90509250929050565b600060208284031215614e7157600080fd5b8135610b6481614b1f565b60ff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c0840152505050565b60006102408201905082511515825260ff602084015116602083015260ff604084015116604083015260ff60608401511660608301526080830151614f196080840182614e7c565b5060a08301516120bc610160840182614e7c565b60008060208385031215614f4057600080fd5b82356001600160401b0380821115614f5757600080fd5b818501915085601f830112614f6b57600080fd5b813581811115614f7a57600080fd5b8660208260051b8501011115614f8f57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015614fd957835183529284019291840191600101614fbd565b50909695505050505050565b600060208284031215614ff757600080fd5b610b6482614d0d565b6000806000806060858703121561501657600080fd5b843561502181614b1f565b93506020850135925060408501356001600160401b0381111561504357600080fd5b61504f87828801614b60565b95989497509550505050565b8015158114610d7157600080fd5b6000806040838503121561507c57600080fd5b823561508781614b1f565b91506020830135614c598161505b565b600080600080608085870312156150ad57600080fd5b84356150b881614b1f565b93506020858101356150c981614b1f565b93506040860135925060608601356001600160401b03808211156150ec57600080fd5b818801915088601f83011261510057600080fd5b81358181111561511257615112614cc7565b615124601f8201601f19168501614cdd565b9150808252898482850101111561513a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b60006020828403121561516c57600080fd5b8135610b648161505b565b6000806040838503121561518a57600080fd5b823561519581614b1f565b91506020830135614c5981614b1f565b600181811c908216806151b957607f821691505b6020821081141561090c57634e487b7160e01b600052602260045260246000fd5b60208082526023908201527f4552433732313a20717565727920666f72206e6f6e6578697374656e7420746f60408201526235b2b760e91b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156152cc576152cc61529c565b500290565b600181815b8085111561530c5781600019048211156152f2576152f261529c565b808516156152ff57918102915b93841c93908002906152d6565b509250929050565b60008261532357506001610828565b8161533057506000610828565b816001811461534657600281146153505761536c565b6001915050610828565b60ff8411156153615761536161529c565b50506001821b610828565b5060208310610133831016604e8410600b841016171561538f575081810a610828565b61539983836152d1565b80600019048211156153ad576153ad61529c565b029392505050565b6000610b646001600160401b03841683615314565b634e487b7160e01b600052601260045260246000fd5b6000826153ef576153ef6153ca565b500690565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561541c57600080fd5b5051919050565b60006000198214156154375761543761529c565b5060010190565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561549357603f19888603018452615481858351614ac7565b94509285019290850190600101615465565b5092979650505050505050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60006001600160401b03808416806154e4576154e46153ca565b92169190910492915050565b60006001600160401b03808316818516818304811182151516156155165761551661529c565b02949350505050565b60006001600160401b038083168185168083038211156155415761554161529c565b01949350505050565b60006001600160401b038381169083168181101561556a5761556a61529c565b039392505050565b600082198211156155855761558561529c565b500190565b600082615599576155996153ca565b500490565b60006001600160401b038216806155b7576155b761529c565b6000190192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155f9816017850160208801614a9b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161562a816028840160208801614a9b565b01602801949350505050565b60018060a01b038416815282602082015260606040820152600061295d6060830184614ac7565b60006020828403121561566f57600080fd5b8151610b648161505b565b60008282101561568c5761568c61529c565b500390565b600061ffff808416806154e4576154e46153ca565b60006001600160401b03808416806156c0576156c06153ca565b92169190910692915050565b600061ffff808316818114156156e4576156e461529c565b6001019392505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b8054600090600181811c908083168061575a57607f831692505b602080841082141561577c57634e487b7160e01b600052602260045260246000fd5b81801561579057600181146157a1576157ce565b60ff198616895284890196506157ce565b60008881526020902060005b868110156157c65781548b8201529085019083016157ad565b505084890196505b50505050505092915050565b60006157e68286615740565b84516157f6818360208901614a9b565b614d9a81830186615740565b60006020828403121561581457600080fd5b8151610b6481614b1f565b60008161582e5761582e61529c565b506000190190565b600060ff821660ff81141561584d5761584d61529c565b60010192915050565b600060ff821660ff84168060ff038211156158735761587361529c565b019392505050565b600060ff83168061588e5761588e6153ca565b8060ff84160691505092915050565b600061ffff8381169083168181101561556a5761556a61529c565b600060ff821660ff8416808210156158d2576158d261529c565b90039392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061590e90830184614ac7565b9695505050505050565b60006020828403121561592a57600080fd5b8151610b6481614a68565b634e487b7160e01b600052603160045260246000fd5b600061ffff8083168185168083038211156155415761554161529c56fea26469706673582212206bfb5b7bac92c329d4ff1a16e3b8319daed7e0d2d11befc7089de71145affd9664736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000
-----Decoded View---------------
Arg [0] : vrfCoordinatorAddress (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [1] : linkTokenAddress (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : _vrfKeyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [3] : _vrfFee (uint256): 2000000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [3] : 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.