Function: close_withdrawal(Withdrawal withdrawal, byte[32] merkle_root, byte[32][] proof)
This function is for closing the withdrawal request.
Inputs
withdrawal
Control: Fully controlled by the caller.
Constraints: The given
requestId
must be not processed yet.Impact: Request for the withdrawal.
merkle_root
Control: Fully controlled by the caller.
Constraints: Must be a valid root for the Merkle proof.
Impact: The root for the Merkle proof.
proof
Control: Fully controlled by the caller.
Constraints: Must be valid with the Merkle proof.
Impact: The proof for the Merkle proof.
Branches and code coverage
Intended branches
Check the given
requestId
is valid for the closing request.Transfer the token if all the conditions are satisfied.
Negative behavior
Revert when the
merkle_root
is invalid.Revert when the
requestId
is already processed.Revert when the proof validation is failed.