Skip to main content

AccountantFactory.sol

Git Source

A factory contract for deploying Accountant contracts

State Variables

defaultConfig

Accountant.Fee public defaultConfig;

Functions

constructor

Constructor initializes the default configuration

constructor();

newAccountant

Deploys a new Accountant contract with default configuration

function newAccountant() external returns (address);

Returns

NameTypeDescription
<none>address_newAccountant The address of the newly deployed Accountant contract

newAccountant

Deploys a new Accountant contract with specified fee manager and recipient

function newAccountant(address feeManager, address feeRecipient) external returns (address);

Parameters

NameTypeDescription
feeManageraddressThe address to receive management and performance fees
feeRecipientaddressThe address to receive refund fees

Returns

NameTypeDescription
<none>address_newAccountant The address of the newly deployed Accountant contract

newAccountant

Deploys a new Accountant contract with specified fee configurations

function newAccountant(
uint16 defaultManagement,
uint16 defaultPerformance,
uint16 defaultRefund,
uint16 defaultMaxFee,
uint16 defaultMaxGain,
uint16 defaultMaxLoss
) external returns (address);

Parameters

NameTypeDescription
defaultManagementuint16Default management fee
defaultPerformanceuint16Default performance fee
defaultRefunduint16Default refund ratio
defaultMaxFeeuint16Default maximum fee
defaultMaxGainuint16Default maximum gain
defaultMaxLossuint16Default maximum loss

Returns

NameTypeDescription
<none>address_newAccountant The address of the newly deployed Accountant contract

newAccountant

Deploys a new Accountant contract with specified fee configurations and addresses

function newAccountant(
address feeManager,
address feeRecipient,
uint16 defaultManagement,
uint16 defaultPerformance,
uint16 defaultRefund,
uint16 defaultMaxFee,
uint16 defaultMaxGain,
uint16 defaultMaxLoss
) public returns (address _newAccountant);

Parameters

NameTypeDescription
feeManageraddressThe address to receive management and performance fees
feeRecipientaddressThe address to receive refund fees
defaultManagementuint16Default management fee
defaultPerformanceuint16Default performance fee
defaultRefunduint16Default refund ratio
defaultMaxFeeuint16Default maximum fee
defaultMaxGainuint16Default maximum gain
defaultMaxLossuint16Default maximum loss

Returns

NameTypeDescription
_newAccountantaddressThe address of the newly deployed Accountant contract

Events

NewAccountant

event NewAccountant(address indexed newAccountant);