Whitelist
Core whitelist module logic, including Merkle proof verification.
Functions
_checkWhitelist
Verifies if an address is whitelisted for a specific amount using a Merkle proof.
Internal function to be used by vault on fractionalised token minting. If whitelisting is disabled, this function reverts.
function _checkWhitelist(bytes32[] calldata _proof, address _account, uint256 _amount) internal view returns (bool);Parameters
_proof
bytes32[]
The Merkle proof.
_account
address
The address to verify.
_amount
uint256
The amount associated with the address.
Returns
<none>
bool
True if proof is valid or if whitelisting is disabled. False otherwise.
_computeLeaf
Helper function to compute the keccak256 hash of the packed address and amount.
Used to generate leaf nodes for the Merkle tree.
Hashes of the leafs are generated using keccak256(bytes.concat(keccak256(abi.encode(...)))), which is the same as OpenZeppelin/merkle-tree package.
function _computeLeaf(address _account, uint256 _amount) internal view returns (bytes32);Parameters
_account
address
The address to hash.
_amount
uint256
The amount associated with the address.
Returns
<none>
bytes32
The keccak256 hash.