-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Problem
Currently, an arbitrary external call can be made using a low-level call, e.g.,
data = svm.createBytes(1024, "data");
address(target).call(data);
However, if the target contract contains an external function that takes dynamic arrays as input, then the above will fail due to the symbolic calldataload offset error.
The current solution requires explicitly constructing calldata for functions that take dynamic arrays, which is cumbersome.
Proposal
Introduce a new cheatcode, say callAny(target, abi), that takes a target contract and the contract's ABI information. It will invoke all the external functions of the target, automatically constructing calldata based on the ABI.
The sizes of dynamic arrays can be specified as arguments within the cheatcode, or they will be implicitly set to a default value.
Metadata
Metadata
Assignees
Labels
No labels