-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forge script
json trace does not respect vm.startPrank
for caller.
#10050
Comments
NOTE that using |
hey @jbrower95 thanks for your report! yeah, the |
For the use-case: I've built zeus a deployments manager that allows expressing transactions meant to be sent to a multisig. We use forge's prank, and then inspect the logs to reverse-engineer what the transaction the user meant to send was... we're then able to form a Gnosis payload from that. Transaction detection is a bit more difficult with the traces not respecting the prank, but not impossible. Thanks! |
forge script
trace does not respect vm.startPrank
for caller.forge script
json trace does not respect vm.startPrank
for caller.
hey @jbrower95 on the second thought, there are entries for for start/stop prank (cheatcodes address is {
...
"trace": {
...
"caller": "0x9f7cf1d1f558e57ef88a59ac3d47214ef25b6a06",
"address": "0x7109709ecfa91a80626ff3989d68f67f5b1dd12d",
...
"kind": "CALL",
"value": "0x0",
"data": "0x06447d560000000000000000000000000000000000000000000000000000000000001234",
...
},
...
},
{
...
"trace": {
...
"caller": "0x9f7cf1d1f558e57ef88a59ac3d47214ef25b6a06",
"address": "0x7fa9385be102ac3eac297483dd6233d62b3e1496",
...
"kind": "CALL",
"value": "0x0",
"data": "0xd09de08a",
...
},
...
},
{
...
"trace": {
...
"caller": "0x9f7cf1d1f558e57ef88a59ac3d47214ef25b6a06",
"address": "0x7109709ecfa91a80626ff3989d68f67f5b1dd12d",
...
"kind": "CALL",
"value": "0x0",
"data": "0x90c5013b",
...
},
...
}
]
} |
You could use the function signatures of
|
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
1.0.0-stable
What version of Foundryup are you on?
1.0.0
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
See the following script:
Should the trace for
empty.increment
show the caller asA
, or the deployed address ofDeployAndTest
?To repro the trace:
forge script script/releases/v1.2.0-genesis/bug.sol --tc DeployAndTest -vvvv --json | jq
IMO, it should be A. This is confusing and counter-intuitive, and is breaking a tool that I'm building. Am I missing something?
The text was updated successfully, but these errors were encountered: