FarmDeployer

Git Source

Inherits: Ownable, ReentrancyGuard

Author: Sperax Foundation.

Exposes base functionalities which will be useful in every deployer.

State Variables

FARM_REGISTRY

address public immutable FARM_REGISTRY;

farmImplementation

address public farmImplementation;

farmId

string public farmId;

Functions

constructor

Constructor.

Parameters

Name
Type
Description

_farmRegistry

address

Address of the Farm Registry.

_farmId

string

Id of the farm.

updateFarmImplementation

Update farm implementation's address.

Only callable by the owner.

Ensure that _newFarmId is correct for the new farm implementation.

Parameters

Name
Type
Description

_newFarmImplementation

address

New farm implementation's address.

_newFarmId

string

ID of the new farm.

_collectFee

Collect fee and transfer it to feeReceiver.

Function fetches all the fee params from farmRegistry.

_validateNonZeroAddr

Validate address.

Events

FarmCreated

FeeCollected

FarmImplementationUpdated

Errors

InvalidAddress

NewFarmImplementationSameAsOld

Last updated