idle_moloch/src/IRaidGeld.sol
2024-11-09 22:14:21 +01:00

92 lines
2.7 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {Army, Player, Boss, LastBossResult} from "./RaidGeldStructs.sol";
/**
* @title IRaidGeld
* @dev Interface for the RaidGeld contract
*/
interface IRaidGeld {
/**
* @notice Registers ETH for the player
*/
function registerEth() external payable;
/**
* @notice Registers DAO tokens for the player
*/
function registerDaoToken() external payable;
/**
* @notice Initiates a raid
*/
function raid() external;
/**
* @notice Adds units to the player's army
* @param unit The type of unit to add
* @param n_units The number of units to add
*/
function addUnit(uint8 unit, uint16 n_units) external;
/**
* @notice Initiates a battle with the boss
* @return hasWonOrAscended An array indicating if the player has won or ascended
*/
function battleWithBoss() external returns (bool[2] memory hasWonOrAscended);
/**
* @notice Gets the player information
* @param addr The address of the player
* @return Player The player information
*/
function getPlayer(address addr) external view returns (Player memory);
/**
* @notice Gets the army information of the player
* @param addr The address of the player
* @return Army The army information
*/
function getArmy(address addr) external view returns (Army memory);
/**
* @notice Gets the boss information
* @param addr The address of the boss
* @return Boss The boss information
*/
function getBoss(address addr) external view returns (Boss memory);
/**
* @notice Gets the result of the last boss battle
* @param addr The address of the player
* @return LastBossResult The result of the last boss battle
*/
function getLastBossResult(address addr) external view returns (LastBossResult memory);
/**
* @notice Checks if the player is registered
* @param addr The address of the player
* @return bool True if the player is registered, false otherwise
*/
function isRegistered(address addr) external view returns (bool);
/**
* @notice Sets the buy-in amount for DAO tokens
* @param newAmount The new buy-in amount
*/
function setDaoTokenBuyInAmount(uint256 newAmount) external;
/**
* @notice Deploys a swap pool with specified amounts of GELD and DAO tokens
* @param _geldAmount The amount of GELD tokens
* @param _daoTokenAmount The amount of DAO tokens
*/
function deploySwapPool(uint256 _geldAmount, uint256 _daoTokenAmount) external;
/**
* @notice Sets the DAO address
* @param _dao The new DAO address
*/
function setDaoAddress(address _dao) external;
}