DirectDepositor
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
| Name | Type | Description |
|---|---|---|
assets | uint256 | The amount of accounting tokens to deposit. |
receiver | address | The receiver of minted shares. |
minShares | uint256 | The minimum amount of shares to be minted. |
referralKey | bytes32 | The optional identifier used to track a referral source. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | shares The amount of shares minted. |
setWhitelistStatus
Enables or disables the whitelist.
function setWhitelistStatus(bool enabled) external override onlyRiskManager;
Parameters
| Name | Type | Description |
|---|---|---|
enabled | bool | True 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
| Name | Type | Description |
|---|---|---|
users | address[] | The addresses of the users to update. |
whitelisted | bool | True to whitelist the users, false to unwhitelist. |