-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(store): change argument order on
Store_SpliceDynamicData
a…
…nd hooks for consistency (#1589)
- Loading branch information
Showing
21 changed files
with
451 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
"@latticexyz/store": major | ||
--- | ||
|
||
The argument order on `Store_SpliceDynamicData`, `onBeforeSpliceDynamicData` and `onAfterSpliceDynamicData` has been changed to match the argument order on `Store_SetRecord`, | ||
where the `PackedCounter encodedLength` field comes before the `bytes dynamicData` field. | ||
|
||
```diff | ||
IStore { | ||
event Store_SpliceDynamicData( | ||
ResourceId indexed tableId, | ||
bytes32[] keyTuple, | ||
uint48 start, | ||
uint40 deleteCount, | ||
+ PackedCounter encodedLengths, | ||
bytes data, | ||
- PackedCounter encodedLengths | ||
); | ||
} | ||
|
||
IStoreHook { | ||
function onBeforeSpliceDynamicData( | ||
ResourceId tableId, | ||
bytes32[] memory keyTuple, | ||
uint8 dynamicFieldIndex, | ||
uint40 startWithinField, | ||
uint40 deleteCount, | ||
+ PackedCounter encodedLengths, | ||
bytes memory data, | ||
- PackedCounter encodedLengths | ||
) external; | ||
|
||
function onAfterSpliceDynamicData( | ||
ResourceId tableId, | ||
bytes32[] memory keyTuple, | ||
uint8 dynamicFieldIndex, | ||
uint40 startWithinField, | ||
uint40 deleteCount, | ||
+ PackedCounter encodedLengths, | ||
bytes memory data, | ||
- PackedCounter encodedLengths | ||
) external; | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.