Skip to content

Commit

Permalink
feat(store): compute FieldLayout at compile time (#1508)
Browse files Browse the repository at this point in the history
Co-authored-by: alvarius <[email protected]>
  • Loading branch information
Boffee and alvrs authored Sep 16, 2023
1 parent 331dbfd commit 211be2a
Show file tree
Hide file tree
Showing 52 changed files with 1,267 additions and 1,503 deletions.
8 changes: 8 additions & 0 deletions .changeset/hot-mice-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@latticexyz/cli": patch
"@latticexyz/store": patch
"@latticexyz/world": patch
---

The `FieldLayout` in table libraries is now generated at compile time instead of dynamically in a table library function.
This significantly reduces gas cost in all table library functions.
49 changes: 21 additions & 28 deletions e2e/packages/contracts/src/codegen/tables/Multi.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 13 additions & 19 deletions e2e/packages/contracts/src/codegen/tables/Number.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 211be2a

Please sign in to comment.