Function: payableCall(PayableCall[] calls)
This aggregates calls with a message value, ensuring each call is successful. Inspired by the Multicall3 contract.
Inputs
calls
Control: Full control. Consists of (target, calldata, value) triples.
Constraints: Target must be a contract. Total value must equal
msg.value
exactly.Impact: The targets to send a payable call to and the data to include.
Branches and code coverage
Intended branches
Approved caller makes a single call with a payment.
Approved caller makes an aggregated call with payments.
Negative behavior
Unapproved caller tries to make a call.
Tries to call a non-contract.
One of multiple calls fail.
Accumulated value differs from
msg.value
.