Skip to content
LogoLogo

DirectDepositor

Git Source

Inherits: MachinePeriphery, SanctionsList, Whitelist, IDirectDepositor

Functions

constructor

constructor(address _registry, address _sanctionsOracle)
        MachinePeriphery(_registry)
        SanctionsList(_sanctionsOracle);

Parameters

NameTypeDescription
_registryaddress
_sanctionsOracleaddress

initialize

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

Parameters

NameTypeDescription
databytes

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
        sanctionsCheck
        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.

setSanctionsCheckStatus

Enables or disables sanctions screening.

function setSanctionsCheckStatus(bool enabled) external override onlyRiskManager;

Parameters

NameTypeDescription
enabledboolTrue to enable screening, false to disable.