WhitelistFacet

Git Source

Provides whitelisting capabilities for private offerings (especially 506(b))

Facet for whitelist functionality in offering diamonds

Functions

whitelistInvestor

Whitelists a single investor.

Only accounts with ADMIN_ROLE can call this function

function whitelistInvestor(address investor) external;

Parameters

Name
Type
Description

investor

address

The address to whitelist.

bulkWhitelistInvestors

Whitelists a batch of investor addresses.

Only accounts with ADMIN_ROLE can call this function

function bulkWhitelistInvestors(address[] calldata investors) external;

Parameters

Name
Type
Description

investors

address[]

Array of addresses to whitelist.

removeFromWhitelist

Removes an investor from the whitelist.

Only accounts with ADMIN_ROLE can call this function

function removeFromWhitelist(address investor) external;

Parameters

Name
Type
Description

investor

address

The address to remove from whitelist.

isWhitelisted

Returns true if an investor is whitelisted.

function isWhitelisted(address investor) external view returns (bool);

Parameters

Name
Type
Description

investor

address

The address to check.

getWhitelistedInvestors

Get all whitelisted investors.

function getWhitelistedInvestors() external view returns (address[] memory investors);

Returns

Name
Type
Description

investors

address[]

Array of whitelisted investor addresses

getWhitelistCount

Get the number of whitelisted investors.

function getWhitelistCount() external view returns (uint256 count);

Returns

Name
Type
Description

count

uint256

Number of whitelisted investors

_requireAuthorized

Internal function to check authorization

Uses diamond's authority() function through delegatecall

function _requireAuthorized() internal view;

_getAuthority

Get the authority address from the diamond

This will be implemented by the diamond's AccessManaged inheritance

function _getAuthority() internal view returns (address);

Events

InvestorWhitelisted

Events

event InvestorWhitelisted(address indexed investor);

InvestorBatchWhitelisted

event InvestorBatchWhitelisted(address[] investors);

InvestorRemovedFromWhitelist

event InvestorRemovedFromWhitelist(address indexed investor);

Last updated

Was this helpful?