Farming Center
#
Code#
AddressFarmingcenter
is deployed at 0x7F281A8cdF66eF5e9db8434Ec6D97acc1bc01E78
on the Polygon mainnet.
#
Events#
DepositTransferredEmitted when ownership of a deposit changes
tokenId
The ID of the deposit (and token) that is being transferredoldOwner
The owner before the deposit was transferrednewOwner
The owner after the deposit was transferred
#
Read-Only Functions#
depositsReturns information about a deposited NFT
Params
tokenId
The ID of the deposit (and token) that is being transferred
Returns
L2TokenId
The nft layer2 idnumberOfFarms
The number of farmsinLimitFarming
The parameter showing if the token is in the limit farmowner
The owner of deposit
#
State-Changing Functions#
connectVirtualPoolUpdates activeIncentive in AlgebraPool. Only farming can do it
Params
pool
The AlgebraPool for which farming was createdvirtualPool
The virtual pool to be connected
#
enterFarmingEnters in incentive (time-limited or eternal farming) with NFT-position token. token must be deposited in FarmingCenter
Params
key
The incentive event keytokenId
The id of position NFTtokensLocked
Amount of tokens to lock for liquidity multiplier (if tiers are used)isLimit
Is incentive time-limited or eternal
#
exitFarmingExits from incentive (time-limited or eternal farming) with NFT-position token
Params
key
The incentive event keytokenId
The id of position NFTisLimit
Is incentive time-limited or eternal
#
collectCollects up to a maximum amount of fees owed to a specific position to the recipient. "proxies" to NonfungiblePositionManager
Params
params
tokenId
The ID of the NFT for which tokens are being collectedrecipient
The account that should receive the tokensamount0Max
The maximum amount of token0 to collectamount1Max
The maximum amount of token1 to collect
Return
amount0
The amount of fees collected in token0amount1
The amount of fees collected in token1
#
collectRewardsUsed to collect reward from eternal farming. Then reward can be claimed.
Params
key
The incentive event keytokenId
The id of position NFT
Return
reward
The amount of collected rewardbonusReward
The amount of collected bonus reward
#
claimRewardUsed to claim and send rewards from farming(s). can be used via static call to get current rewards for user
Params
rewardToken
The token that is a rewardto
The address to be rewardedamountRequestedIncentive
Amount to claim in incentive (limit) farmingamountRequestedEternal
Amount to claim in eternal farming
Return
reward
The summary amount of claimed rewards
#
withdrawTokenWithdraw Algebra NFT-position token. can be used via static call to get current rewards for user
Params
tokenId
The id of position NFTto
New owner of position NFTdata
The additional data for NonfungiblePositionManager