If msg.sender and/or tx.origin are the defaults AND we find the CALLER or ORIGIN opcodes in the script's method being executed THEN log a warning and require the developer to confirm they want the script to run anyway.
If the sender and/or origin are not specified in the CLI but are used in the script, unintended addresses may be passed to other contracts resulting in unwanted outcomes e.g. a Uniswap output going to the wrong address.
In the warning they should instead be advised to use an address that they know e.g. the same address they are broadcasting with.
Component
Forge
Describe the feature you would like
Issue created after this discussion with @mds1 in the TG group: https://t.me/foundry_support/32128
If
msg.sender
and/ortx.origin
are the defaults AND we find theCALLER
orORIGIN
opcodes in the script's method being executed THEN log a warning and require the developer to confirm they want the script to run anyway.If the sender and/or origin are not specified in the CLI but are used in the script, unintended addresses may be passed to other contracts resulting in unwanted outcomes e.g. a Uniswap output going to the wrong address.
In the warning they should instead be advised to use an address that they know e.g. the same address they are broadcasting with.
Additional context
No response