CamelotV3FarmDeployer

Git Source

Inherits: FarmDeployer

Author: Sperax Foundation.

This contract allows anyone to calculate fees, pay fees and create farms.

State Variables

CAMELOT_V3_FACTORY

address public immutable CAMELOT_V3_FACTORY;

NFPM

address public immutable NFPM;

CAMELOT_UTILS

address public immutable CAMELOT_UTILS;

CAMELOT_NFPM_UTILS

address public immutable CAMELOT_NFPM_UTILS;

Functions

constructor

Constructor of the contract.

constructor(
    address _farmRegistry,
    string memory _farmId,
    address _camelotV3Factory,
    address _nfpm,
    address _camelotUtils,
    address _nfpmUtils
) FarmDeployer(_farmRegistry, _farmId);

Parameters

createFarm

Deploys a new CamelotV3 farm.

The caller of this function should approve feeAmount to this contract before calling this function.

function createFarm(FarmData memory _data) external nonReentrant returns (address);

Parameters

Returns

Structs

FarmData

struct FarmData {
    address farmAdmin;
    uint256 farmStartTime;
    uint256 cooldownPeriod;
    CamelotPoolData camelotPoolData;
    RewardTokenData[] rewardData;
}