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

Gas optimisation ObjectInfo #653

Open
2 tasks
Tracked by #594
doerfli opened this issue Aug 30, 2024 · 0 comments
Open
2 tasks
Tracked by #594

Gas optimisation ObjectInfo #653

doerfli opened this issue Aug 30, 2024 · 0 comments

Comments

@doerfli
Copy link
Contributor

doerfli commented Aug 30, 2024

  • Remove initialOwner field from ObjectInfo as its not really needed
  • Remove data field from struct and store data in a separate mapping which is only used in the rare case that the object has data

This will reduce the amout of slots needed for ObjectInfo by 50% down to 2 slots which will cut read/write costs for this in half.

Example tx https://amoy.polygonscan.com/tx/0xc85256c6980d7c30ec633892906c51d38d800e24b18a1c7704cc63b2f9e25cd5

Write example
basetest___Tenderly

Read example
basetest___Tenderly

@doerfli doerfli added enhancement New feature or request registry labels Aug 30, 2024
@doerfli doerfli added this to the GIF v3 Audit Ready milestone Aug 30, 2024
@doerfli doerfli self-assigned this Aug 30, 2024
@doerfli doerfli changed the title Optimization: Move data field from ObjectInfo to separate map in Registry Gas optimisdation ObjectInfo Sep 3, 2024
@doerfli doerfli mentioned this issue Sep 3, 2024
4 tasks
@doerfli doerfli changed the title Gas optimisdation ObjectInfo Gas optimisation ObjectInfo Sep 3, 2024
@doerfli doerfli removed the enhancement New feature or request label Sep 3, 2024
@doerfli doerfli assigned doerfli and rapidddenis and unassigned doerfli Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants