ethereum-optimism / ethereum-optimism/optimism
`_7702Target = address(0)` will result in `OptimismPortal2.depositTransaction` fuzzing test failure
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 38m
- Merged PRs (30d)
- 164
Description
**Bug Description**
In the `testFuzz_depositTransaction_eoa7702_succeeds` fuzzing test in `OptimismPortal2.t.sol`, if the `_7702Target` param happens to be `address(0)`, it will result in etching empty bytes to `depositor`'s code and leads to `depositor`'s address being aliased and test failure.
- etching `depositor` in test: https://github.com/ethereum-optimism/optimism/blob/a1e78ba69da239270bf26da656fbdb6a5f9d2578/packages/contracts-bedrock/test/L1/OptimismPortal2.t.sol#L2668
- `OptimismPortal2.depositTransaction` checking if `msg.sender` is an EOA (and alias if it is): https://github.com/ethereum-optimism/optimism/blob/a1e78ba69da239270bf26da656fbdb6a5f9d2578/packages/contracts-bedrock/src/L1/OptimismPortal2.sol#L606-L609
- test will fail because the `from` in `TransactionDeposited ` event does not match: https://github.com/ethereum-optimism/optimism/blob/a1e78ba69da239270bf26da656fbdb6a5f9d2578/packages/contracts-bedrock/test/L1/OptimismPortal2.t.sol#L2656-L2665
**Steps to Reproduce**
Etch the `depositor`'s code with `address(0)` and test
**Expected behavior**
Test will fail due to log mismatch (the `from` in `TransactionDeposited ` event)
**Environment Information:**
**Configurations:**
**Logs:**
**Additional context**
---
⚠️ **Notice:** Issues that do not include the following sections will be subject to closure:
- Bug Description
- Steps to Reproduce
- Environment Information
Please ensure all required sections are filled out accurately to expedite the debugging process and improve issue resolution efficiency.
Contributor guide
Assessment
This issue has not been assessed yet.