Skip to content

Commit

Permalink
refactor: separate data into staticData, encodedLengths, dynamicData …
Browse files Browse the repository at this point in the history
…in getRecord (#1532)

Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
Co-authored-by: alvrs <alvarius@lattice.xyz>
  • Loading branch information
3 people committed Sep 18, 2023
1 parent ac508bf commit ae340b2
Show file tree
Hide file tree
Showing 54 changed files with 1,168 additions and 637 deletions.
13 changes: 13 additions & 0 deletions .changeset/hip-tables-check.md
@@ -0,0 +1,13 @@
---
"@latticexyz/store": major
"@latticexyz/world": major
---

Store's `getRecord` has been updated to return `staticData`, `encodedLengths`, and `dynamicData` instead of a single `data` blob, to match the new behaviour of Store setter methods.

If you use codegenerated libraries, you will only need to update `encode` calls.

```diff
- bytes memory data = Position.encode(x, y);
+ (bytes memory staticData, PackedCounter encodedLengths, bytes memory dynamicData) = Position.encode(x, y);
```
51 changes: 39 additions & 12 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.

4 changes: 2 additions & 2 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.

4 changes: 2 additions & 2 deletions e2e/packages/contracts/src/codegen/tables/NumberList.sol

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

51 changes: 39 additions & 12 deletions e2e/packages/contracts/src/codegen/tables/Vector.sol

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

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

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

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

0 comments on commit ae340b2

Please sign in to comment.