Function: close_withdrawal(Withdrawal withdrawal, byte[32] merkle_root, byte[32][] proof)
This function is for closing the withdrawal request.
Inputs
withdrawalControl: Fully controlled by the caller.
Constraints: The given
requestIdmust be not processed yet.Impact: Request for the withdrawal.
merkle_rootControl: Fully controlled by the caller.
Constraints: Must be a valid root for the Merkle proof.
Impact: The root for the Merkle proof.
proofControl: 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
requestIdis valid for the closing request.Transfer the token if all the conditions are satisfied.
Negative behavior
Revert when the
merkle_rootis invalid.Revert when the
requestIdis already processed.Revert when the proof validation is failed.