From c0aba569c96574b6140b89b497d48f1e63ec9e18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:01:52 -0700 Subject: [PATCH] Version Packages (next) (#1419) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 3 + CHANGELOG.md | 84 ++++++++++++++++++++++++ packages/abi-ts/CHANGELOG.md | 6 ++ packages/abi-ts/package.json | 2 +- packages/block-logs-stream/CHANGELOG.md | 9 +++ packages/block-logs-stream/package.json | 2 +- packages/cli/CHANGELOG.md | 16 +++++ packages/cli/package.json | 2 +- packages/common/CHANGELOG.md | 7 ++ packages/common/package.json | 2 +- packages/config/CHANGELOG.md | 8 +++ packages/config/package.json | 2 +- packages/create-mud/CHANGELOG.md | 2 + packages/create-mud/package.json | 2 +- packages/dev-tools/CHANGELOG.md | 13 ++++ packages/dev-tools/package.json | 14 ++-- packages/ecs-browser/CHANGELOG.md | 2 + packages/ecs-browser/package.json | 2 +- packages/gas-report/CHANGELOG.md | 2 + packages/gas-report/package.json | 2 +- packages/network/CHANGELOG.md | 2 + packages/network/package.json | 2 +- packages/noise/CHANGELOG.md | 2 + packages/noise/package.json | 2 +- packages/phaserx/CHANGELOG.md | 7 ++ packages/phaserx/package.json | 2 +- packages/protocol-parser/CHANGELOG.md | 8 +++ packages/protocol-parser/package.json | 2 +- packages/react/CHANGELOG.md | 8 +++ packages/react/package.json | 2 +- packages/recs/CHANGELOG.md | 8 +++ packages/recs/package.json | 2 +- packages/schema-type/CHANGELOG.md | 2 + packages/schema-type/package.json | 2 +- packages/services/CHANGELOG.md | 2 + packages/services/package.json | 2 +- packages/solecs/CHANGELOG.md | 2 + packages/solecs/package.json | 2 +- packages/solhint-config-mud/CHANGELOG.md | 2 + packages/solhint-config-mud/package.json | 2 +- packages/solhint-plugin-mud/CHANGELOG.md | 2 + packages/solhint-plugin-mud/package.json | 2 +- packages/std-client/CHANGELOG.md | 2 + packages/std-client/package.json | 2 +- packages/std-contracts/CHANGELOG.md | 2 + packages/std-contracts/package.json | 2 +- packages/store-cache/CHANGELOG.md | 2 + packages/store-cache/package.json | 2 +- packages/store-indexer/CHANGELOG.md | 10 +++ packages/store-indexer/package.json | 2 +- packages/store-sync/CHANGELOG.md | 13 ++++ packages/store-sync/package.json | 2 +- packages/store/CHANGELOG.md | 77 ++++++++++++++++++++++ packages/store/package.json | 2 +- packages/utils/CHANGELOG.md | 2 + packages/utils/package.json | 2 +- packages/world/CHANGELOG.md | 80 ++++++++++++++++++++++ packages/world/package.json | 2 +- 58 files changed, 419 insertions(+), 34 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 9f32e2ddc9..279db2386d 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -52,6 +52,7 @@ "fluffy-moles-march", "four-coats-pull", "funny-paws-admire", + "fuzzy-cars-stare", "giant-masks-carry", "great-cooks-dream", "grumpy-geckos-raise", @@ -64,6 +65,7 @@ "late-spies-cover", "lazy-ladybugs-return", "little-ravens-yawn", + "long-lizards-admire", "many-phones-study", "mean-pans-study", "metal-cats-double", @@ -88,6 +90,7 @@ "seven-flies-chew", "sharp-worms-kneel", "short-ads-jog", + "silver-mangos-thank", "six-cats-agree", "smooth-elephants-wave", "smooth-pots-nail", diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5d3fdc26..a8854a35c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,87 @@ +# Version 2.0.0-next.7 + +## Major changes + +**[feat(store,world): more granularity for onchain hooks (#1399)](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15)** (@latticexyz/store, @latticexyz/world) + +- The `onSetRecord` hook is split into `onBeforeSetRecord` and `onAfterSetRecord` and the `onDeleteRecord` hook is split into `onBeforeDeleteRecord` and `onAfterDeleteRecord`. + The purpose of this change is to allow more fine-grained control over the point in the lifecycle at which hooks are executed. + + The previous hooks were executed before modifying data, so they can be replaced with the respective `onBefore` hooks. + + ```diff + - function onSetRecord( + + function onBeforeSetRecord( + bytes32 table, + bytes32[] memory key, + bytes memory data, + Schema valueSchema + ) public; + + - function onDeleteRecord( + + function onBeforeDeleteRecord( + bytes32 table, + bytes32[] memory key, + Schema valueSchema + ) public; + ``` + +- It is now possible to specify which methods of a hook contract should be called when registering a hook. The purpose of this change is to save gas by avoiding to call no-op hook methods. + + ```diff + function registerStoreHook( + bytes32 tableId, + - IStoreHook hookAddress + + IStoreHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + + function registerSystemHook( + bytes32 systemId, + - ISystemHook hookAddress + + ISystemHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + ``` + + There are `StoreHookLib` and `SystemHookLib` with helper functions to encode the bitmap of enabled hooks. + + ```solidity + import { StoreHookLib } from "@latticexyz/store/src/StoreHook.sol"; + + uint8 storeHookBitmap = StoreBookLib.encodeBitmap({ + onBeforeSetRecord: true, + onAfterSetRecord: true, + onBeforeSetField: true, + onAfterSetField: true, + onBeforeDeleteRecord: true, + onAfterDeleteRecord: true + }); + ``` + + ```solidity + import { SystemHookLib } from "@latticexyz/world/src/SystemHook.sol"; + + uint8 systemHookBitmap = SystemHookLib.encodeBitmap({ + onBeforeCallSystem: true, + onAfterCallSystem: true + }); + ``` + +- The `onSetRecord` hook call for `emitEphemeralRecord` has been removed to save gas and to more clearly distinguish ephemeral tables as offchain tables. + +## Patch changes + +**[fix(abi-ts): remove cwd join (#1418)](https://github.com/latticexyz/mud/commit/2459e15fc9bf49fff2d769b9efba07b99635f2cc)** (@latticexyz/abi-ts) + +Let `glob` handle resolving the glob against the current working directory. + +**[feat(world): allow callFrom from own address without explicit delegation (#1407)](https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481)** (@latticexyz/world) + +Allow `callFrom` with the own address as `delegator` without requiring an explicit delegation + +--- + # Version 2.0.0-next.6 ## Major changes diff --git a/packages/abi-ts/CHANGELOG.md b/packages/abi-ts/CHANGELOG.md index 0ab850a42f..2206bd70de 100644 --- a/packages/abi-ts/CHANGELOG.md +++ b/packages/abi-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @latticexyz/abi-ts +## 2.0.0-next.7 + +### Patch Changes + +- [#1418](https://github.com/latticexyz/mud/pull/1418) [`2459e15f`](https://github.com/latticexyz/mud/commit/2459e15fc9bf49fff2d769b9efba07b99635f2cc) Thanks [@holic](https://github.com/holic)! - Let `glob` handle resolving the glob against the current working directory. + ## 2.0.0-next.6 ### Minor Changes diff --git a/packages/abi-ts/package.json b/packages/abi-ts/package.json index e231789f49..6e7052b1d0 100644 --- a/packages/abi-ts/package.json +++ b/packages/abi-ts/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/abi-ts", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Create TypeScript type declaration files (`.d.ts`) for your ABI JSON files.", "repository": { "type": "git", diff --git a/packages/block-logs-stream/CHANGELOG.md b/packages/block-logs-stream/CHANGELOG.md index f277837d40..c65566ebf5 100644 --- a/packages/block-logs-stream/CHANGELOG.md +++ b/packages/block-logs-stream/CHANGELOG.md @@ -1,5 +1,14 @@ # @latticexyz/block-logs-stream +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/config@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 1fcbb31192..1085b00e26 100644 --- a/packages/block-logs-stream/package.json +++ b/packages/block-logs-stream/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/block-logs-stream", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Create a stream of EVM block logs for events", "repository": { "type": "git", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 534aa6ecca..1ba6642178 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15), [`2459e15f`](https://github.com/latticexyz/mud/commit/2459e15fc9bf49fff2d769b9efba07b99635f2cc), [`18d3aea5`](https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/world@2.0.0-next.7 + - @latticexyz/abi-ts@2.0.0-next.7 + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/config@2.0.0-next.7 + - @latticexyz/gas-report@2.0.0-next.7 + - @latticexyz/protocol-parser@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + - @latticexyz/services@2.0.0-next.7 + - @latticexyz/utils@2.0.0-next.7 + ## 2.0.0-next.6 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 8d7b0449db..e9e3df7eea 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index 8c7a578931..1eb31dd15d 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/common/package.json b/packages/common/package.json index 8abb4456ca..a5ced5763e 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/common", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Common low level logic shared between packages", "repository": { "type": "git", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index d3b382b49f..fc3166a275 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 878d9aba3d..60607e5785 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/config", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Config for Store and World", "repository": { "type": "git", diff --git a/packages/create-mud/CHANGELOG.md b/packages/create-mud/CHANGELOG.md index e214411b45..4866c67955 100644 --- a/packages/create-mud/CHANGELOG.md +++ b/packages/create-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ### Minor Changes diff --git a/packages/create-mud/package.json b/packages/create-mud/package.json index 76ee8debef..03ac7dd38f 100644 --- a/packages/create-mud/package.json +++ b/packages/create-mud/package.json @@ -1,6 +1,6 @@ { "name": "create-mud", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Create a new MUD project", "license": "MIT", "author": "Lattice ", diff --git a/packages/dev-tools/CHANGELOG.md b/packages/dev-tools/CHANGELOG.md index 21816f1330..aefada976f 100644 --- a/packages/dev-tools/CHANGELOG.md +++ b/packages/dev-tools/CHANGELOG.md @@ -1,5 +1,18 @@ # @latticexyz/dev-tools +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15), [`18d3aea5`](https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/world@2.0.0-next.7 + - @latticexyz/react@2.0.0-next.7 + - @latticexyz/store-sync@2.0.0-next.7 + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/recs@2.0.0-next.7 + - @latticexyz/utils@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index 3ed3dbfb0d..73b4320f30 100644 --- a/packages/dev-tools/package.json +++ b/packages/dev-tools/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/dev-tools", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "MUD developer tools", "repository": { "type": "git", @@ -51,12 +51,12 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/common": "2.0.0-next.6", - "@latticexyz/recs": "2.0.0-next.6", - "@latticexyz/store": "2.0.0-next.6", - "@latticexyz/store-sync": "2.0.0-next.6", - "@latticexyz/utils": "2.0.0-next.6", - "@latticexyz/world": "2.0.0-next.6" + "@latticexyz/common": "2.0.0-next.7", + "@latticexyz/recs": "2.0.0-next.7", + "@latticexyz/store": "2.0.0-next.7", + "@latticexyz/store-sync": "2.0.0-next.7", + "@latticexyz/utils": "2.0.0-next.7", + "@latticexyz/world": "2.0.0-next.7" }, "publishConfig": { "access": "public" diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index 7e717a09e0..abb75abcbb 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/ecs-browser +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index 1427fe6859..d0cac40c36 100644 --- a/packages/ecs-browser/package.json +++ b/packages/ecs-browser/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/ecs-browser", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/gas-report/CHANGELOG.md b/packages/gas-report/CHANGELOG.md index 440e5306eb..0a4ac78422 100644 --- a/packages/gas-report/CHANGELOG.md +++ b/packages/gas-report/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ### Major Changes diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index e896b6b92f..fc97259229 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/gas-report", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Gas reporter for specific lines within forge tests", "repository": { "type": "git", diff --git a/packages/network/CHANGELOG.md b/packages/network/CHANGELOG.md index c4381ab115..23167d767b 100644 --- a/packages/network/CHANGELOG.md +++ b/packages/network/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/network +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/network/package.json b/packages/network/package.json index c3214807ba..7659ebc485 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/network", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/noise/CHANGELOG.md b/packages/noise/CHANGELOG.md index 9cf926eccd..c1e1da813a 100644 --- a/packages/noise/CHANGELOG.md +++ b/packages/noise/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/noise/package.json b/packages/noise/package.json index c0bf7bc4e8..cb73c66e01 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/noise", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "license": "MIT", "type": "module", "exports": { diff --git a/packages/phaserx/CHANGELOG.md b/packages/phaserx/CHANGELOG.md index 1dd3efb7c1..f4b606349d 100644 --- a/packages/phaserx/CHANGELOG.md +++ b/packages/phaserx/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/utils@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/phaserx/package.json b/packages/phaserx/package.json index 6126e240e9..8c56e1fec8 100644 --- a/packages/phaserx/package.json +++ b/packages/phaserx/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/phaserx", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/protocol-parser/CHANGELOG.md b/packages/protocol-parser/CHANGELOG.md index 54e8b6b821..708b400625 100644 --- a/packages/protocol-parser/CHANGELOG.md +++ b/packages/protocol-parser/CHANGELOG.md @@ -1,5 +1,13 @@ # @latticexyz/protocol-parser +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index 7638c1a331..33a1674594 100644 --- a/packages/protocol-parser/package.json +++ b/packages/protocol-parser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/protocol-parser", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 64bfccf743..1fb047e3a3 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/recs@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 515ef0d74d..93e7d156dd 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/react", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "React tools for MUD client.", "repository": { "type": "git", diff --git a/packages/recs/CHANGELOG.md b/packages/recs/CHANGELOG.md index 75f481c621..833c6f845b 100644 --- a/packages/recs/CHANGELOG.md +++ b/packages/recs/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.7 + - @latticexyz/utils@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/recs/package.json b/packages/recs/package.json index e6430318ac..14595558f0 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/recs", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/schema-type/CHANGELOG.md b/packages/schema-type/CHANGELOG.md index 71b9295bd7..f517629eeb 100644 --- a/packages/schema-type/CHANGELOG.md +++ b/packages/schema-type/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index 13d543202d..a7b5463968 100644 --- a/packages/schema-type/package.json +++ b/packages/schema-type/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/schema-type", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "SchemaType enum for various languages", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index 259e51485b..f290a38448 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/services/package.json b/packages/services/package.json index 1e97f1712b..28c3358d47 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "MUD services for enhanced interactions with on-chain ECS state", "repository": { "type": "git", diff --git a/packages/solecs/CHANGELOG.md b/packages/solecs/CHANGELOG.md index 6a586f3c62..7e80ed7bec 100644 --- a/packages/solecs/CHANGELOG.md +++ b/packages/solecs/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/solecs +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/solecs/package.json b/packages/solecs/package.json index 75bef6743c..a9ee1a0030 100644 --- a/packages/solecs/package.json +++ b/packages/solecs/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/solecs", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/solhint-config-mud/CHANGELOG.md b/packages/solhint-config-mud/CHANGELOG.md index 5a2a195d5c..7c4a4a887b 100644 --- a/packages/solhint-config-mud/CHANGELOG.md +++ b/packages/solhint-config-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index 361103c512..fddb57eb00 100644 --- a/packages/solhint-config-mud/package.json +++ b/packages/solhint-config-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-config-mud", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/solhint-plugin-mud/CHANGELOG.md b/packages/solhint-plugin-mud/CHANGELOG.md index 5a2a195d5c..7c4a4a887b 100644 --- a/packages/solhint-plugin-mud/CHANGELOG.md +++ b/packages/solhint-plugin-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index 0581e3f011..c2ef8077ed 100644 --- a/packages/solhint-plugin-mud/package.json +++ b/packages/solhint-plugin-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-plugin-mud", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/std-client/CHANGELOG.md b/packages/std-client/CHANGELOG.md index d841d3e47f..983562e209 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-client +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/std-client/package.json b/packages/std-client/package.json index e3026eb03f..8a6fdbe36c 100644 --- a/packages/std-client/package.json +++ b/packages/std-client/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/std-client", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/std-contracts/CHANGELOG.md b/packages/std-contracts/CHANGELOG.md index e4e38be5ae..1b6c0f3d3c 100644 --- a/packages/std-contracts/CHANGELOG.md +++ b/packages/std-contracts/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-contracts +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/std-contracts/package.json b/packages/std-contracts/package.json index 43013a8840..6995511ef1 100644 --- a/packages/std-contracts/package.json +++ b/packages/std-contracts/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/std-contracts", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/store-cache/CHANGELOG.md b/packages/store-cache/CHANGELOG.md index bf66896393..1f193d263d 100644 --- a/packages/store-cache/CHANGELOG.md +++ b/packages/store-cache/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/store-cache +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/store-cache/package.json b/packages/store-cache/package.json index ca568d7b17..93be48ccfe 100644 --- a/packages/store-cache/package.json +++ b/packages/store-cache/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/store-cache", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "private": true } diff --git a/packages/store-indexer/CHANGELOG.md b/packages/store-indexer/CHANGELOG.md index 7281564c76..0807481c98 100644 --- a/packages/store-indexer/CHANGELOG.md +++ b/packages/store-indexer/CHANGELOG.md @@ -1,5 +1,15 @@ # @latticexyz/store-indexer +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/store-sync@2.0.0-next.7 + - @latticexyz/block-logs-stream@2.0.0-next.7 + - @latticexyz/common@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index 322ac0a769..0636b81fdf 100644 --- a/packages/store-indexer/package.json +++ b/packages/store-indexer/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-indexer", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Minimal Typescript indexer for Store", "repository": { "type": "git", diff --git a/packages/store-sync/CHANGELOG.md b/packages/store-sync/CHANGELOG.md index 57bd011e6d..923a974a6b 100644 --- a/packages/store-sync/CHANGELOG.md +++ b/packages/store-sync/CHANGELOG.md @@ -1,5 +1,18 @@ # @latticexyz/store-sync +## 2.0.0-next.7 + +### Patch Changes + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15), [`18d3aea5`](https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/world@2.0.0-next.7 + - @latticexyz/block-logs-stream@2.0.0-next.7 + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/protocol-parser@2.0.0-next.7 + - @latticexyz/recs@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Patch Changes diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index 8961f15163..f74cc00e7a 100644 --- a/packages/store-sync/package.json +++ b/packages/store-sync/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-sync", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Utilities to sync MUD Store events with a client or cache", "repository": { "type": "git", diff --git a/packages/store/CHANGELOG.md b/packages/store/CHANGELOG.md index 6a432d28e9..6733a97de7 100644 --- a/packages/store/CHANGELOG.md +++ b/packages/store/CHANGELOG.md @@ -1,5 +1,82 @@ # Change Log +## 2.0.0-next.7 + +### Major Changes + +- [#1399](https://github.com/latticexyz/mud/pull/1399) [`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15) Thanks [@alvrs](https://github.com/alvrs)! - - The `onSetRecord` hook is split into `onBeforeSetRecord` and `onAfterSetRecord` and the `onDeleteRecord` hook is split into `onBeforeDeleteRecord` and `onAfterDeleteRecord`. + The purpose of this change is to allow more fine-grained control over the point in the lifecycle at which hooks are executed. + + The previous hooks were executed before modifying data, so they can be replaced with the respective `onBefore` hooks. + + ```diff + - function onSetRecord( + + function onBeforeSetRecord( + bytes32 table, + bytes32[] memory key, + bytes memory data, + Schema valueSchema + ) public; + + - function onDeleteRecord( + + function onBeforeDeleteRecord( + bytes32 table, + bytes32[] memory key, + Schema valueSchema + ) public; + ``` + + - It is now possible to specify which methods of a hook contract should be called when registering a hook. The purpose of this change is to save gas by avoiding to call no-op hook methods. + + ```diff + function registerStoreHook( + bytes32 tableId, + - IStoreHook hookAddress + + IStoreHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + + function registerSystemHook( + bytes32 systemId, + - ISystemHook hookAddress + + ISystemHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + ``` + + There are `StoreHookLib` and `SystemHookLib` with helper functions to encode the bitmap of enabled hooks. + + ```solidity + import { StoreHookLib } from "@latticexyz/store/src/StoreHook.sol"; + + uint8 storeHookBitmap = StoreBookLib.encodeBitmap({ + onBeforeSetRecord: true, + onAfterSetRecord: true, + onBeforeSetField: true, + onAfterSetField: true, + onBeforeDeleteRecord: true, + onAfterDeleteRecord: true + }); + ``` + + ```solidity + import { SystemHookLib } from "@latticexyz/world/src/SystemHook.sol"; + + uint8 systemHookBitmap = SystemHookLib.encodeBitmap({ + onBeforeCallSystem: true, + onAfterCallSystem: true + }); + ``` + + - The `onSetRecord` hook call for `emitEphemeralRecord` has been removed to save gas and to more clearly distinguish ephemeral tables as offchain tables. + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/config@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Minor Changes diff --git a/packages/store/package.json b/packages/store/package.json index af15727a8b..f2e3e66ff2 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "Store", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 46dfcd67f9..b1c4fb9165 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.7 + ## 2.0.0-next.6 ## 2.0.0-next.5 diff --git a/packages/utils/package.json b/packages/utils/package.json index ccfe41f1a0..cf94e596a6 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/utils", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md index b8c325dfd6..48725d10bd 100644 --- a/packages/world/CHANGELOG.md +++ b/packages/world/CHANGELOG.md @@ -1,5 +1,85 @@ # Change Log +## 2.0.0-next.7 + +### Major Changes + +- [#1399](https://github.com/latticexyz/mud/pull/1399) [`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15) Thanks [@alvrs](https://github.com/alvrs)! - - The `onSetRecord` hook is split into `onBeforeSetRecord` and `onAfterSetRecord` and the `onDeleteRecord` hook is split into `onBeforeDeleteRecord` and `onAfterDeleteRecord`. + The purpose of this change is to allow more fine-grained control over the point in the lifecycle at which hooks are executed. + + The previous hooks were executed before modifying data, so they can be replaced with the respective `onBefore` hooks. + + ```diff + - function onSetRecord( + + function onBeforeSetRecord( + bytes32 table, + bytes32[] memory key, + bytes memory data, + Schema valueSchema + ) public; + + - function onDeleteRecord( + + function onBeforeDeleteRecord( + bytes32 table, + bytes32[] memory key, + Schema valueSchema + ) public; + ``` + + - It is now possible to specify which methods of a hook contract should be called when registering a hook. The purpose of this change is to save gas by avoiding to call no-op hook methods. + + ```diff + function registerStoreHook( + bytes32 tableId, + - IStoreHook hookAddress + + IStoreHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + + function registerSystemHook( + bytes32 systemId, + - ISystemHook hookAddress + + ISystemHook hookAddress, + + uint8 enabledHooksBitmap + ) public; + ``` + + There are `StoreHookLib` and `SystemHookLib` with helper functions to encode the bitmap of enabled hooks. + + ```solidity + import { StoreHookLib } from "@latticexyz/store/src/StoreHook.sol"; + + uint8 storeHookBitmap = StoreBookLib.encodeBitmap({ + onBeforeSetRecord: true, + onAfterSetRecord: true, + onBeforeSetField: true, + onAfterSetField: true, + onBeforeDeleteRecord: true, + onAfterDeleteRecord: true + }); + ``` + + ```solidity + import { SystemHookLib } from "@latticexyz/world/src/SystemHook.sol"; + + uint8 systemHookBitmap = SystemHookLib.encodeBitmap({ + onBeforeCallSystem: true, + onAfterCallSystem: true + }); + ``` + + - The `onSetRecord` hook call for `emitEphemeralRecord` has been removed to save gas and to more clearly distinguish ephemeral tables as offchain tables. + +### Patch Changes + +- [#1407](https://github.com/latticexyz/mud/pull/1407) [`18d3aea5`](https://github.com/latticexyz/mud/commit/18d3aea55b1d7f4b442c21343795c299a56fc481) Thanks [@alvrs](https://github.com/alvrs)! - Allow `callFrom` with the own address as `delegator` without requiring an explicit delegation + +- Updated dependencies [[`c4d5eb4e`](https://github.com/latticexyz/mud/commit/c4d5eb4e4e4737112b981a795a9c347e3578cb15)]: + - @latticexyz/store@2.0.0-next.7 + - @latticexyz/common@2.0.0-next.7 + - @latticexyz/config@2.0.0-next.7 + - @latticexyz/schema-type@2.0.0-next.7 + ## 2.0.0-next.6 ### Minor Changes diff --git a/packages/world/package.json b/packages/world/package.json index d78498a545..c80c8b6eea 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world", - "version": "2.0.0-next.6", + "version": "2.0.0-next.7", "description": "World framework", "repository": { "type": "git",