Skip to content

Commit

Permalink
Update IKaliCurve.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
audsssy committed Dec 7, 2023
1 parent 0fafaab commit 90565d9
Showing 1 changed file with 32 additions and 33 deletions.
65 changes: 32 additions & 33 deletions src/interface/IKaliCurve.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,55 @@ pragma solidity ^0.8.17;
enum CurveType {
NA,
LINEAR,
CURVE
POLY
}

/// @notice Kali DAO share manager interface
interface IKaliCurve {
/// @dev DAO logic
function setKaliDaoFactory(address factory) external payable;
function getKaliDaoFactory() external view returns (address);
function getImpactDao(uint256 curveId) external view returns (address);

/// @dev User logic.
function mint(uint256 curveId, address patron) external payable;
function burn(uint256 curveId, address patron) external payable;
function donate(uint256 curveId, address patron, uint256 donation) external payable;
function leave(uint256 curveId, address patron) external payable;
function claim() external payable;
function getUnclaimed(address user) external view returns (uint256);

/// @dev Curve setter logic
/// @dev Creator logic
function curve(
uint256 curveId,
CurveType curveType,
uint256 minSupplyToBurn,
uint256 constant_a,
uint256 constant_b,
uint256 constant_c,
bool sale,
string calldata detail
) external payable returns (uint256);
bool canMint,
bool daoTreasury,
address owner,
uint96 scale,
uint16 burnRatio, // Relative to mint price.
uint48 constant_a,
uint48 constant_b,
uint48 constant_c
) external payable returns (uint256 curveId);

/// @dev Curve setter logic
function setCurveDetail(uint256 curveId, string calldata detail) external payable;
function setCurveMintStatus(uint256 curveId, bool sale) external payable;
function setMintConstantA(uint256 curveId, uint256 constant_a) external payable;
function setMintConstantB(uint256 curveId, uint256 constant_b) external payable;
function setMintConstantC(uint256 curveId, uint256 constant_c) external payable;
function setBurnConstantA(uint256 curveId, uint256 constant_a) external payable;
function setBurnConstantB(uint256 curveId, uint256 constant_b) external payable;
function setBurnConstantC(uint256 curveId, uint256 constant_c) external payable;
function setCurveMintStatus(uint256 curveId, bool canMint) external payable;
function setCurveTreasury(uint256 curveId, bool daoTreasury) external payable;
function setCurveData(uint256 curveId, uint256 key) external payable;

/// @dev Curve getter logic.
function getOwner(uint256 curveId) external view returns (address);
function getCurveCount() external view returns (uint256);
function getCurveDetail(uint256 curveId) external view returns (string memory);
function getCurveOwner(uint256 curveId) external view returns (address);
function getCurveSupply(uint256 curveId) external view returns (uint256);
function getCurveMinSupplyToBurn(uint256 curveId) external view returns (uint256);
function getCurveMintStatus(uint256 curveId) external view returns (bool);
function getCurveTreasury(uint256 curveId) external view returns (bool);
function getCurveType(uint256 curveId) external view returns (CurveType);
function getMintConstantA(uint256 curveId) external view returns (uint256);
function getMintConstantB(uint256 curveId) external view returns (uint256);
function getMintConstantC(uint256 curveId) external view returns (uint256);
function getBurnConstantA(uint256 curveId) external view returns (uint256);
function getBurnConstantB(uint256 curveId) external view returns (uint256);
function getBurnConstantC(uint256 curveId) external view returns (uint256);
function getMintPrice(uint256 curveId) external view returns (uint256);
function getBurnPrice(uint256 curveId) external view returns (uint256);
function getCurveData(uint256 curveId) external view returns (uint256, uint256, uint256, uint256, uint256);
function getPrice(bool mint, uint256 curveId) external view returns (uint256);
function getMintBurnDifference(uint256 curveId) external view returns (uint256);
function getUnclaimed(address user) external view returns (uint256);
function getImpactDao(uint256 curveId) external view returns (address);

/// @dev Helper Logic
function encodeCurveData(uint96 scale, uint16 burnRatio, uint48 constant_a, uint48 constant_b, uint48 constant_c)
external
pure
returns (uint256);
function decodeCurveData(uint256 key) external pure returns (uint256, uint256, uint256, uint256, uint256);
}

0 comments on commit 90565d9

Please sign in to comment.