Skip to main content

DirectDepositor

Git Source

Inherits: MachinePeriphery, Whitelist, IDirectDepositor

Functions

constructor

constructor(address _registry) MachinePeriphery(_registry);

initialize

function initialize(bytes calldata data) external virtual override initializer;

deposit

Deposits accounting tokens into the machine and mints shares to the receiver.

function deposit(uint256 assets, address receiver, uint256 minShares, bytes32 referralKey)
public
virtual
override
whitelistCheck
returns (uint256);

Parameters

NameTypeDescription
assetsuint256The amount of accounting tokens to deposit.
receiveraddressThe receiver of minted shares.
minSharesuint256The minimum amount of shares to be minted.
referralKeybytes32The optional identifier used to track a referral source.

Returns

NameTypeDescription
<none>uint256shares The amount of shares minted.

setWhitelistStatus

Enables or disables the whitelist.

function setWhitelistStatus(bool enabled) external override onlyRiskManager;

Parameters

NameTypeDescription
enabledboolTrue to enable the whitelist, false to disable.

setWhitelistedUsers

Whitelists or unwhitelists a list of users.

function setWhitelistedUsers(address[] calldata users, bool whitelisted) external override onlyRiskManager;

Parameters

NameTypeDescription
usersaddress[]The addresses of the users to update.
whitelistedboolTrue to whitelist the users, false to unwhitelist.