Support `$.fieldXXX.slot` syntax for erc-7201 style storage
Open
feature
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 29
Description
It'll be very helpful to support such syntax:
```solidity
Erc7201Storage storage $ = _getStorage();
assembly {
sstore($.fieldXXX.slot, shr(192, calldataload(176)))
}
```
Currently, the `xxx.slot` syntax only works if `xxx` is a directly declared contract storage variable.
Contributor guide
Research direction
Start by reproducing the ERC-7201-style example and tracing the existing handling of `.slot` for directly declared contract storage variables. The work is done when `$.fieldXXX.slot` is accepted for the shown storage reference and coverage verifies the generated storage-slot behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, solidity
- Domain
- blockchain, compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100