AlgebraFarming

Abstract base contract for Algebra farmings

Modifiers

onlyIncentiveMaker

onlyOwner

onlyFarmingCenter

Variables

contract INonfungiblePositionManager nonfungiblePositionManager immutable

The nonfungible position manager with which this farming contract is compatible

contract IAlgebraPoolDeployer deployer immutable

The pool deployer

contract IFarmingCenter farmingCenter

The farming Center

mapping(bytes32 => struct AlgebraFarming.Incentive) incentives

Represents a farming incentive

Developer note: bytes32 refers to the return value of IncentiveId.compute

mapping(address => mapping(contract IERC20Minimal => uint256)) rewards

Returns amounts of reward tokens owed to a given address according to the last time all farms were updated

Developer note: rewards[owner][rewardToken] => uint256

Functions

setIncentiveMaker

onlyOwner

setIncentiveMaker(address) external

Updates the incentive maker

setFarmingCenterAddress

onlyOwner

setFarmingCenterAddress(address) external

Updates farming center address

claimReward

claimReward(contract IERC20Minimal,address,uint256) external

Transfers `amountRequested` of accrued `rewardToken` rewards from the contract to the recipient `to`

Returns:

claimRewardFrom

onlyFarmingCenter

claimRewardFrom(contract IERC20Minimal,address,address,uint256) external

Transfers `amountRequested` of accrued `rewardToken` rewards from the contract to the recipient `to` only for FarmingCenter

Returns: