solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Support for arbitrary contract storage base location

Open matheusaaguiar opened this issue 11 months ago • 6 comments

This is the list of steps required to support the specification of arbitrary contract storage base locations. There's already a long discussion in (previous) issue #597, which provided the basis for the syntax and behavior, recorded here: Initial syntax for explicit storage locations

Tasks

  • [x] Syntax, Parsing, AST import/export support: #15463
  • [x] Type checking (analysis): #15528
  • [x] Storage layout output and codegen: #15668
  • [x] Documentation: #15892
  • [x] Report errors only for contracts that directly inherit from one with a layout: #15900
  • [x] Warn when the base slot is too close to the end of storage (2^64 slots or less): #15912
  • [ ] #15911
  • [ ] Add builtin function erc7201
  • [x] Support constants in base slot expression

matheusaaguiar avatar Jan 17 '25 20:01 matheusaaguiar

Hi, can i work on any of the task?

krishpranav avatar Jan 21 '25 12:01 krishpranav

Hi @krishpranav , thanks for your interest, but currently these tasks are already being worked on (even though they may not have a PR yet).

matheusaaguiar avatar Jan 23 '25 14:01 matheusaaguiar

okay cool, is there any other issues which requires a PR as an outside collaborator.

krishpranav avatar Jan 23 '25 16:01 krishpranav

Hi @krishpranav , sorry for the delay in responding you. At the moment we don't have anything flagged as a good issue for collaborators.

matheusaaguiar avatar Feb 10 '25 14:02 matheusaaguiar

I added two missing things to the task list:

  • erc7201() is not the only element that was not implemented in #15528. There are also constants.
  • We merged the type checking PR without https://github.com/ethereum/solidity/pull/15528#discussion_r1967472244, but it should still be done in a separate PR.

cameel avatar Feb 27 '25 18:02 cameel

Added a task for the warning about storage located too close to the edge.

cameel avatar Mar 03 '25 14:03 cameel