foundry-rs / foundry-rs/foundry
feat(`cheatcodes`): include trace information about setting account code in EIP7702 transaction
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Forge
### Describe the feature you would like
In a forge test that uses the `vm.signAndAttachDelegation` (or `vm.attachDelegation`) cheatcode, it'd be helpful if the test's trace somehow showed the account's code being set. Right now the process is opaque for the devs, and it's unclear whether the account's code was updated or not.
For example, right now if I do:
```solidity
vm.signAndAttachDelegation(address(delegateContract), bob.privateKey);
address(0).call("");
```
Then the trace shows:
```solidity
├─ [0] VM::signAndAttachDelegation(DelegateContractV1: [0x8Ad159a275AEE56fb2334DBb69036E9c7baCEe9b], 25733205992525344549959058604562080613152606839721263039386232180585134200482 [2.573e76])
│ └─ ← [Return] (1, 0x30326dccdd7ff594b3bfa85acdb7a472414233bcfef3db1a3aeaa453d10891b9, 0x76aee582915fbaf1cc3105cd7c1f37d4dbb13eaf64117fd9e6447fb50d281a2f, 0, 0x8Ad159a275AEE56fb2334DBb69036E9c7baCEe9b)
├─ [0] 0x0000000000000000000000000000000000000000::fallback()
│ └─ ← [Stop]
```
But there's nothing in the call to address(0) that signals the call has 7702 data attached and that it's setting code to an account.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.