address public router; // Balancer router
address public minedToken; // ETC token
address public rewardToken; // PPI token
address public lpToken; // ETC-CFX pair token
function deposit(uint256 amount, address account) public override onlyRole(DEPOSIT_ROLE)
amount
: amount of ETC to deposit. Note,approve
required before deposit.account
: account to deposit for.
uint256 public totalShares
function accountInfos(address account) public view returns (uint256 shares, uint256 accRewardPerShare)
function balanceOf(address account) public view override returns (
uint256 totalBalance,
uint256 unlockedBalance,
LockedBalance[] memory lockedBalances
)
struct LockedBalance {
uint256 amount;
uint256 unlockTime;
}
Note, please set the from
address in eth_call
to query account rewards.
function claimReward(address recipient) public returns (uint256)
function withdraw(
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address payable to,
uint256 deadline
) external;
Note, user will NOT receive CFX and PPI rewards if force withdraw locked LP.
function forceWithdraw(
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external;
Withdraw native tokens (CFX):
function withdrawETH(uint256 amount, address payable recipient) public onlyOwner
Query withdrawable rewards:
uint256 public forceWithdrawRewards
Withdraw rewards (PPI):
function withdrawRewards(uint256 amount, address recipient) public onlyOwner