Farming Center
Code#
Address#
Farmingcenter is deployed at 0x7F281A8cdF66eF5e9db8434Ec6D97acc1bc01E78 on the Polygon mainnet.
Events#
DepositTransferred#
Emitted when ownership of a deposit changes
tokenIdThe ID of the deposit (and token) that is being transferredoldOwnerThe owner before the deposit was transferrednewOwnerThe owner after the deposit was transferred
Read-Only Functions#
deposits#
Returns information about a deposited NFT
Params
tokenIdThe ID of the deposit (and token) that is being transferred
Returns
L2TokenIdThe nft layer2 idnumberOfFarmsThe number of farmsinLimitFarmingThe parameter showing if the token is in the limit farmownerThe owner of deposit
State-Changing Functions#
connectVirtualPool#
Updates activeIncentive in AlgebraPool. Only farming can do it
Params
poolThe AlgebraPool for which farming was createdvirtualPoolThe virtual pool to be connected
enterFarming#
Enters in incentive (time-limited or eternal farming) with NFT-position token. token must be deposited in FarmingCenter
Params
keyThe incentive event keytokenIdThe id of position NFTtokensLockedAmount of tokens to lock for liquidity multiplier (if tiers are used)isLimitIs incentive time-limited or eternal
exitFarming#
Exits from incentive (time-limited or eternal farming) with NFT-position token
Params
keyThe incentive event keytokenIdThe id of position NFTisLimitIs incentive time-limited or eternal
collect#
Collects up to a maximum amount of fees owed to a specific position to the recipient. "proxies" to NonfungiblePositionManager
Params
paramstokenIdThe ID of the NFT for which tokens are being collectedrecipientThe account that should receive the tokensamount0MaxThe maximum amount of token0 to collectamount1MaxThe maximum amount of token1 to collect
Return
amount0The amount of fees collected in token0amount1The amount of fees collected in token1
collectRewards#
Used to collect reward from eternal farming. Then reward can be claimed.
Params
keyThe incentive event keytokenIdThe id of position NFT
Return
rewardThe amount of collected rewardbonusRewardThe amount of collected bonus reward
claimReward#
Used to claim and send rewards from farming(s). can be used via static call to get current rewards for user
Params
rewardTokenThe token that is a rewardtoThe address to be rewardedamountRequestedIncentiveAmount to claim in incentive (limit) farmingamountRequestedEternalAmount to claim in eternal farming
Return
rewardThe summary amount of claimed rewards
withdrawToken#
Withdraw Algebra NFT-position token. can be used via static call to get current rewards for user
Params
tokenIdThe id of position NFTtoNew owner of position NFTdataThe additional data for NonfungiblePositionManager