// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @title IAdventure * @author Limit Break, Inc. * @notice The base interface that all `Adventure` contracts must conform to. * @dev All contracts that implement the adventure/quest system and interact with an {IAdventurous} token are required to implement this interface. */ interface IAdventure is IERC165 { /** * @dev Returns whether or not quests on this adventure lock tokens. * Developers of adventure contract should ensure that this is immutable * after deployment of the adventure contract. Failure to do so * can lead to error that deadlock token transfers. */ function questsLockTokens() external view returns (bool); /** * @dev A callback function that AdventureERC721 must invoke when a quest has been successfully entered. * Throws if the caller is not an expected AdventureERC721 contract designed to work with the Adventure. * Not permitted to throw in any other case, as this could lead to tokens being locked in quests. */ function onQuestEntered(address adventurer, uint256 tokenId, uint256 questId) external; /** * @dev A callback function that AdventureERC721 must invoke when a quest has been successfully exited. * Throws if the caller is not an expected AdventureERC721 contract designed to work with the Adventure. * Not permitted to throw in any other case, as this could lead to tokens being locked in quests. */ function onQuestExited(address adventurer, uint256 tokenId, uint256 questId, uint256 questStartTimestamp) external; }