ILeo
Inherits: ILeoEvents
Functions
vestPosition
vest a position that the caller owns.
function vestPosition(address pool, uint256 id) external;
Parameters
Name | Type | Description |
---|---|---|
pool | address | to take the position from |
id | uint256 | of the position to take |
createCampaign
create a campaign with the parameters given.
takes extraMax from the user of the token given
function createCampaign(
bytes8 campaignId,
address pool,
int32 tickLower,
int32 tickUpper,
uint64 perSecond,
address token,
uint256 extraMax,
uint64 starting,
uint64 ending
) external;
Parameters
Name | Type | Description |
---|---|---|
campaignId | bytes8 | to modify for the pool given |
pool | address | to reward positions that participate in with |
tickLower | int32 | to reward positions in this range with |
tickUpper | int32 | to reward positions in this range with |
perSecond | uint64 | distribution to send |
token | address | to give out |
extraMax | uint256 | to start the pool amount with for this pool |
starting | uint64 | to when to start the token distribution with |
ending | uint64 | for when to stop the token distribution |
updateCampaign
create a campaign with the parameters given.
takes extraMax from the user of the token given
function updateCampaign(
bytes8 campaignId,
address pool,
int32 tickLower,
int32 tickUpper,
uint64 perSecond,
address token,
uint256 extraMax,
uint64 starting,
uint64 ending
) external;
Parameters
Name | Type | Description |
---|---|---|
campaignId | bytes8 | to modify for the pool given |
pool | address | to reward positions that participate in with |
tickLower | int32 | to reward positions in this range with |
tickUpper | int32 | to reward positions in this range with |
perSecond | uint64 | distribution to send |
token | address | to give out |
extraMax | uint256 | to start the pool amount with for this pool |
starting | uint64 | to when to start the token distribution with |
ending | uint64 | for when to stop the token distribution |
campaignRevisions
the amount of times this campaign was modified for the pool
function campaignRevisions(address pool, bytes8 campaignId) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
pool | address | to check the campaign for |
campaignId | bytes8 | to check revisions for |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | the amount of times the campaign was modified |
cancelCampaign
cancel an ongoing campaign by amending it to have 0
only usable by the admin of the pool
function cancelCampaign(address pool, bytes8 campaignId) external;
Parameters
Name | Type | Description |
---|---|---|
pool | address | to modify the campaign for |
campaignId | bytes8 | to modify |
campaignDetails
details of a campaign
function campaignDetails(address pool, bytes8 campaignId)
external
view
returns (
int32 tickLower,
int32 tickUpper,
uint64 perSecond,
address token,
uint256 distributed,
uint256 maximum,
uint64 startingTimestamp,
uint64 endingTimestamp
);
Parameters
Name | Type | Description |
---|---|---|
pool | address | this campaign is for |
campaignId | bytes8 | to identify this campaign |
poolLp
pool LP tokens vested to Leo for this pool
function poolLp(address pool) external returns (uint256 lp);
Parameters
Name | Type | Description |
---|---|---|
pool | address | to check |
Returns
Name | Type | Description |
---|---|---|
lp | uint256 | tokens to return |
collect
collect rewards for a position vested in a pool with the campaigns given
function collect(PositionDetails[] memory positionDetails, bytes8[] memory campaignIds)
external
returns (PoolRewards[] memory poolRewards, CampaignRewards[] memory campaignRewards);
Parameters
Name | Type | Description |
---|---|---|
positionDetails | PositionDetails[] | to check |
campaignIds | bytes8[] | to check |
divestPosition
divest a position, returning the position ID to the user
function divestPosition(address pool, uint256 positionId) external;
Parameters
Name | Type | Description |
---|---|---|
pool | address | to check |
positionId | uint256 | to check |
Structs
PositionDetails
struct PositionDetails {
address token;
uint256 id;
}
PoolRewards
struct PoolRewards {
address pool;
uint128 amount0Lp;
uint128 amount1Lp;
}
CampaignRewards
struct CampaignRewards {
address campaignToken;
uint256 rewards;
}