Function: withdraw(VaultTypes.VaultWithdraw data)
This allows to transfer withdrawn funds to the receiver. The data is almost controlled by the initiator of cross-chain messages in main chain. This function only performs this action without any validation, because all validation checks should be done in the main chain.
Inputs
dataControl: The data is controlled by the sender of cross-chain messages. In this case, this is an operator of the OperatorManager contract.
Constraints: N/A.
Impact: Contains the amount of tokens that will be transferred to the receiver as well as the fee amount, the hash of the token that will be transferred, and the sender who initiated the withdrawn action.
Branches and code coverage
Negative behavior
Caller is not
onlyCrossChainManager.
Function call analysis
tokenAddress.safeTransfer(data.receiver, amount);External/Internal? External.
Argument control?
data.receiveris controlled by the sender of cross-chain messages,tokenAddressis associated with the providedtokenHash, andamountis thedata.tokenAmountwithoutdata.fee.Impact: Function transfers
amountof tokens to thereceiver, the address of thereceiver, and theamountof tokens are controlled by a contract in the main chain.