Acala Developers
Incentives Predeploy Contract
You can use this predeploy contract to call incentives pallet
This contracts will interact with incentives pallet
function claimRewards(enum InterfaceIncentives.PoolId pool, address poolCurrencyId) external nonpayable returns (bool)
Claim all avalible multi currencies rewards for specific PoolId.
It'll emit an {ClaimedRewards} event.
Name | Type | Description |
---|---|---|
pool | enum InterfaceIncentives.PoolId | The pool type. |
poolCurrencyId | address | The LP token currency id. |
Name | Type | Description |
---|---|---|
_0 | bool | Returns a boolean value indicating whether the operation succeeded. |
function depositDexShare(address currencyId, uint256 amount) external nonpayable returns (bool)
Stake LP token to add shares to PoolId::Dex.
It'll emit an {DepositedShare} event.
Name | Type | Description |
---|---|---|
currencyId | address | The LP token currency id. |
amount | uint256 | The amount to stake. |
Name | Type | Description |
---|---|---|
_0 | bool | Returns a boolean value indicating whether the operation succeeded. |
function getClaimRewardDeductionRate(enum InterfaceIncentives.PoolId pool, address poolCurrencyId) external view returns (uint256)
Gets deduction rate for claiming reward early.
Name | Type | Description |
---|---|---|
pool | enum InterfaceIncentives.PoolId | The pool type. |
poolCurrencyId | address | The LP token currency id. |
Name | Type | Description |
---|---|---|
_0 | uint256 | Returns (claim_reward_deduction_rate) as a FixedU128 representing a decimal value. |
function getIncentiveRewardAmount(enum InterfaceIncentives.PoolId pool, address poolCurrencyId, address rewardCurrencyId) external view returns (uint256)
Gets reward amount in rewardCurrency
added per period.
Name | Type | Description |
---|---|---|
pool | enum InterfaceIncentives.PoolId | The pool type. |
poolCurrencyId | address | The LP token currency id. |
rewardCurrencyId | address | The reward currency id. |
Name | Type | Description |
---|---|---|
_0 | uint256 | Returns (reward_amount). |
function getPendingRewards(address[] currencyIds, enum InterfaceIncentives.PoolId pool, address poolCurrencyId, address who) external view returns (uint256[])
Gets the pending rewards for a pool, actual reward could be deducted.
Name | Type | Description |
---|---|---|
currencyIds | address[] | undefined |
pool | enum InterfaceIncentives.PoolId | The pool type. |
poolCurrencyId | address | The LP token currency id. |
who | address | The specified user. |
Name | Type | Description |
---|---|---|
_0 | uint256[] | Returns (balances), an array of reward balances corresponding to currencyIds. |
function withdrawDexShare(address currencyId, uint256 amount) external nonpayable returns (bool)
Unstake LP token to remove shares from PoolId::Dex.
It'll emit an {WithdrewShare} event.
Name | Type | Description |
---|---|---|
currencyId | address | The LP token currency id. |
amount | uint256 | The amount to unstake. |
Name | Type | Description |
---|---|---|
_0 | bool | Returns a boolean value indicating whether the operation succeeded. |
event ClaimedRewards(address indexed sender, enum InterfaceIncentives.PoolId indexed pool, address indexed poolCurrencyId)
The Claimed rewards event.
Name | Type | Description |
---|---|---|
sender indexed |
address | The sender of the transaction. |
pool indexed |
enum InterfaceIncentives.PoolId | The pool type. |
poolCurrencyId indexed |
address | The LP token currency id. |
event DepositedShare(address indexed sender, address indexed currencyId, uint256 amount)
The deposited share event.
Name | Type | Description |
---|---|---|
sender indexed |
address | The sender of the transaction. |
currencyId indexed |
address | The LP token currency id. |
amount | uint256 | The amount to stake. |
event WithdrewShare(address indexed sender, address indexed currencyId, uint256 amount)
The withdrew share event.
Name | Type | Description |
---|---|---|
sender indexed |
address | The sender of the transaction. |
currencyId indexed |
address | The LP token currency id. |
amount | uint256 | The amount to unstake. |