Function: executeBatch(address[] dest, uint256[] value, byte[][] func)
Executes a sequence of transactions (called directly by entryPoint
).
Inputs
dest
Control: Fully controlled by the user.
Constraints: N/A.
Impact: The array of the address of the target contract to call.
value
Control: Fully controlled by the user.
Constraints: N/A.
Impact: The array of amount of Wei (ETH) to send along with the call.
func
Control: Fully controlled by the user.
Constraints: N/A.
Impact: The array of calldata to send to the target contract.
Branches and code coverage (including function calls)
Intended branches
Tests that the account can run
executeBatch
correctly.Tests that the account can run
executeBatch
correctly withvalue.length == 0
.
Negative behavior
Tests that the account reverts when running
executeBatch
from a non-entryPoint
.Tests that the account reverts when
dest.length
is not equal withfunc.length
.
Function call analysis
executeBatch -> _call(address target, uint256 value, bytes memory data) -> target.call{value: value}(data)
What is controllable?
target
,value
, anddata
.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? If there is a reentry attempt, the function will revert because the
execute
method is called from a non-entryPoint
.