Sperax
  • USDs (Sperax USD)
    • Minting and Redeeming
    • Auto Yield
      • Smart Contracts can opt in for the rebase feature (Auto-yield).
    • Stability Mechanism
    • Key parameters and functions
    • Technical documents
      • Sequence diagrams
      • Smart contracts
        • Vault
        • USDs
        • CollateralManager
        • SPA Buyback
        • MasterPriceOracle
        • Yield Reserve
        • Fee Calculator
        • RebaseManager
        • Dripper
        • BaseStrategy
      • Deployed contracts
  • Buyback Contract
  • Staking Protocol
    • Locking SPA
    • Withdrawing SPA
    • Staking Rewards
  • Demeter Protocol
    • How does Demeter Work?
    • Technical documents
      • Smart contracts
        • E721 Farms
          • E721Farm
          • Camelot V3
            • CamelotV3FarmDeployer
            • CamelotV3Farm
        • Base contracts
          • Farm
          • FarmStorage
          • FarmRegistry
          • FarmDeployer
        • Features
          • ClaimableFee
          • ExpirableFarm
          • OperableDeposit
        • Rewarder
          • Rewarder
          • RewarderFactory
      • Deployed contracts
  • Getting Started on Our DApp
    • Minting & Redeeming USDs
    • Stake SPA
  • Governance
  • Bug Bounty Program
  • FAQ
    • SPA Tokenomics
    • xSPA token
    • Smart Contract Addresses
    • How to Transfer SPA from Ethereum to Arbitrum
  • Quick Links
    • Audit Reports
    • Sperax Dapp
    • Demeter Dapp
    • Discord
    • Forum
    • Snapshot
Powered by GitBook
On this page
  • State Variables
  • CAMELOT_V3_FACTORY
  • NFPM
  • CAMELOT_UTILS
  • CAMELOT_NFPM_UTILS
  • Functions
  • constructor
  • createFarm
  • Structs
  • FarmData

Was this helpful?

Export as PDF
  1. Demeter Protocol
  2. Technical documents
  3. Smart contracts
  4. E721 Farms
  5. Camelot V3

CamelotV3FarmDeployer

PreviousCamelot V3NextCamelotV3Farm

Was this helpful?

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

Name
Type
Description

_farmRegistry

address

Address of the Demeter Farm Registry.

_farmId

string

Id of the farm.

_camelotV3Factory

address

Address of CamelotV3 factory.

_nfpm

address

Address of Camelot NonfungiblePositionManager contract.

_camelotUtils

address

Address of CamelotUtils (Camelot helper) contract.

_nfpmUtils

address

Address of Camelot INonfungiblePositionManagerUtils (NonfungiblePositionManager helper) contract.

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

Name
Type
Description

_data

FarmData

Data for deployment.

Returns

Name
Type
Description

<none>

address

Address of the deployed farm.

Structs

FarmData

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