Marking funds that need to be withdrawn by the depositor. This function does NOT do any transfers. It only marks funds by creating Funds structs and mapping them to user and token addresses. Also changes {balanceSheetS} and emits event. Created for security purposes.
Arguments
Name
Type
Description
tokenAddress
address
address of the token to be marked for withdrawal
value
uint256
amount of the token to be marked for withdrawal
release
Actual withdrawal through releasing funds and making transfer to the client who called the function. In order to be released, funds first have to be marked as {fundsToWithdrawS} by the {withdraw()} function and time interval set as {releaseLock} has to pass since withdraw() was called. Uses different transfer logic depending on which token is used (ETH/WETH/ERC20).
Arguments
Name
Type
Description
tokenAddress
address
- address of the token to be released
withdrawTimestamp
uint256
- timestamp associated with a certain withdraw request (can be found in {Funds} struct included in the {fundsToWithdrawS} mapping).