Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureRequest: Change visibility of StorageLocation to Internal #141

Open
KONFeature opened this issue Dec 19, 2023 · 0 comments
Open

FeatureRequest: Change visibility of StorageLocation to Internal #141

KONFeature opened this issue Dec 19, 2023 · 0 comments

Comments

@KONFeature
Copy link

KONFeature commented Dec 19, 2023

Update the visibility of the storage location const from private to internal.

This would break ERC-7201 arround storage naming for the contracts who override this constants, but it will permit some projects built with OZ 4.x upgrades contracts to upgrade to 5.x (with a lot of cares ofc and big disclaimer everywhere, but this would help drastically reduce gas for some projects).

As far as what I saw, for a simple ERC1155 contracts, the main impacts would be:

  • Custom set of the ERC1155StorageLocation to the right pointer (with the help of forge inspect MyERC1155 storage-layout --pretty for exemple)
  • Create an upgradable function that reset the initialiser stuff (no need to set the INITIALIZABLE_STORAGE location, since no matter what it would clash with the update from uint8 to uint64, so new uint64 would overlap the previous _initializing bool)
  • And ofc update the callbacks and functions to the new stuff (before & after transfers callbacks)

I can wrote some documentation around major upgrade from 4 to 5 if needed

Tasks

No tasks being tracked yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant