Master Chef
The MasterChef.sol
👨🍳 🍷 contract is the contract that handles APW rewards for liquidity providers. Liquidity providers deposit their LP Tokens in the MasterChef contract to get APW rewards.
The MasterChef contract is derived from Sushi V1 MasterChef contract.
APWine's MasterChef contract doesn't mint APW tokens. Tokens are provisioned to the contract to get distributed.
#
Methods#
getMultiplierfunction getMultiplier(uint256 _from, uint256 _to)
#
pendingAPWfunction pendingAPW(uint256 _pid, address _user)
Get the number of APW rewards available for _user
for LP Tokens with _pid
.
#
massUpdatePoolsfunction massUpdatePools()
Update pool reward state for all pools registered in the contract.
⚠️ Can be expensive in gas
#
updatePoolfunction updatePool(uint256 _pid)
Update pool reward state for pool with id _pid
.
#
depositfunction deposit(uint256 _pid, uint256 _amount)
Deposit _amount
of LP Tokens corresponding to pool with ID _pid
.
#
withdrawfunction withdraw(uint256 _pid, uint256 _amount)
Withdraw _amount
of LP Tokens corresponding to pool with ID _pid
.
#
emergencyWithdrawfunction emergencyWithdraw(uint256 _pid)
Withdraw LP tokens for pool with id _pid
without rewards.
⚠️ For emergency only