foundry-rs / foundry-rs/foundry

Support EIP-7201 in `forge inspect storage`

Open
#7,662 7 comments 4 reactions 0 assignees View on GitHub
C-forge Cmd-forge-inspect T-blocked T-feature
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
18h 20m
Merged PRs (30d)
510

Description

### Component

Forge

### Have you ensured that all of these are up to date?

- [X] Foundry
- [X] Foundryup

### What version of Foundry are you on?

forge 0.2.0 (89f0fb9 2024-04-14T00:20:50.727844499Z)

### What command(s) is the bug in?

forge inspect

### Operating System

Linux

### Describe the bug

https://eips.ethereum.org/EIPS/eip-7201 introduces a new (namespace) approach for storage layout esp. for upgradeable contracts. This is already used in OZ v5.

`forge inspect storage` however does not list such namespaced storage.

# To replicate

forge inspect storage of ERC20 based on https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/token/ERC20/ERC20Upgradeable.sol

# ideal fix

`forge inspect storage --pretty` appends the ERC7201 based storage to the list.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.