index-> the index of the new Farming setup. This parameter is empty if adding a new setup.
FarmingSetupInfo-> struct containing the new setup
setFarmingSetupsinternally calls the
_setOrAddFarmingSetupInfomethod to create the setup, which takes as input the information just passed in the
setupIndex-> the index of the new Farming setup
FarmingSetupInfostruct functions as an informational repository of each
FarmingSetup. Consequently, each new setup is created by passing information from outside via a
FarmingSetupInfostruct, which will generate the corresponding
FarmingSetupinternally in the Contract. The
FarmingSetupcontains only the information strictly necessary for the operation of the setup; all other information is stored in the
blockDuration-> duration of the setup in blocks
startBlock-> start block of the setup*
minStakeable-> minimum amount of the main token that can be staked by a position in the setup
renewtimes-> amount of times the setup can be renewed
addressof the Uniswap v3 liquidity pool for the setup
addressof the chosen main token; used to perform some checks such as the
involvingETH-> boolean value representing if ETH is a token in the setup (
true) or not (
setupsCount-> number of setups created by the passing of this info; populated automatically by the contract and for internal use only
lastSetupIndex-> index of last setup created by this info; populated automatically by the contract and for internal use only
tickLower->parameter representing the value of
tickLowerused to create the Uniswap v3 NFT for the setup.
tickUpper->parameter representing the value of
tickUpperused to create the Uniswap v3 NFT for the setup.
activatesetupcannot be called before that
blockis reached. If
startBlockis set as zero, then the setup can be activated any time after it is created.
FarmingSetupInfostruct, the information for the NFT to be created for the Uniswap v3 price curve and liquidity position is passed from the host. The info regarding the
addressesof the pair tokens (token0 and token1) and the pool fee is retrieved from the passed
liquidityPoolTokenAddress; to create a Free Farming Generation 2 setup, the Uniswap v3 pool you want to use must already exist. The
tickUpperparameters provide the remaining data.
infoIndex-> setup info index
active-> a boolean value representing if the setup is active (
true) or inactive (
startBlock-> farming setup start block corresponding to setup activation block
endBlock-> farming setup end block calculated as
setup start Block + setup duration
lastUpdateBlock-> number of the block where an update was triggered in the setup (for internal use only such as reward position calculation)
objectId-> Id of the reference NFT (Uniswap v3) of the setup once it is minted.
rewardPerBlock-> farming setup reward per block set
totalSupply-> it represents the
liquidityparameter of the NFT (Uniswap v3) that is the total liquidity amount inserted all users of that setup.