From b93c2f117adb81e07159bf75b31e6567736515b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Oct 2023 13:55:19 +0000 Subject: [PATCH] Version Packages (next) --- .changeset/pre.json | 21 +++ CHANGELOG.md | 190 +++++++++++++++++++++++ docs/pages/changelog.mdx | 190 +++++++++++++++++++++++ packages/abi-ts/CHANGELOG.md | 6 + packages/abi-ts/package.json | 2 +- packages/block-logs-stream/CHANGELOG.md | 10 ++ packages/block-logs-stream/package.json | 2 +- packages/cli/CHANGELOG.md | 82 ++++++++++ packages/cli/package.json | 2 +- packages/common/CHANGELOG.md | 29 ++++ packages/common/package.json | 2 +- packages/config/CHANGELOG.md | 11 ++ packages/config/package.json | 2 +- packages/create-mud/CHANGELOG.md | 27 ++++ packages/create-mud/package.json | 2 +- packages/dev-tools/CHANGELOG.md | 23 +++ packages/dev-tools/package.json | 14 +- packages/ecs-browser/CHANGELOG.md | 2 + packages/ecs-browser/package.json | 2 +- packages/faucet/CHANGELOG.md | 6 + packages/faucet/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 | 6 + packages/phaserx/package.json | 2 +- packages/protocol-parser/CHANGELOG.md | 11 ++ packages/protocol-parser/package.json | 2 +- packages/react/CHANGELOG.md | 9 ++ packages/react/package.json | 2 +- packages/recs/CHANGELOG.md | 7 + 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 | 20 +++ packages/store-indexer/package.json | 2 +- packages/store-sync/CHANGELOG.md | 22 +++ packages/store-sync/package.json | 2 +- packages/store/CHANGELOG.md | 34 ++++ packages/store/package.json | 2 +- packages/utils/CHANGELOG.md | 2 + packages/utils/package.json | 2 +- packages/world-modules/CHANGELOG.md | 44 ++++++ packages/world-modules/package.json | 2 +- packages/world/CHANGELOG.md | 84 ++++++++++ packages/world/package.json | 2 +- 63 files changed, 894 insertions(+), 36 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 45459f64e2d..cd2fdf6eac0 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -35,6 +35,7 @@ }, "changesets": [ "afraid-hotels-bathe", + "angry-ladybugs-invent", "beige-badgers-smile", "beige-radios-drop", "big-goats-prove", @@ -44,6 +45,7 @@ "breezy-cameras-switch", "brown-garlics-lie", "brown-icons-burn", + "chatty-planets-heal", "chilled-chicken-repair", "chilled-cougars-smash", "chilled-kangaroos-dream", @@ -55,6 +57,7 @@ "curly-countries-obey", "curly-numbers-talk", "curvy-tables-melt", + "cyan-baboons-breathe", "cyan-hats-try", "cyan-timers-tan", "dirty-items-retire", @@ -66,6 +69,7 @@ "fast-ears-hug", "fast-zebras-drum", "fast-zebras-promise", + "few-brooms-accept", "few-jars-turn", "few-mirrors-reflect", "few-papayas-leave", @@ -78,9 +82,11 @@ "funny-paws-admire", "fuzzy-cars-stare", "giant-masks-carry", + "gold-rings-switch", "great-cooks-dream", "grumpy-files-heal", "grumpy-geckos-raise", + "heavy-eyes-smile", "hip-tables-check", "honest-months-boil", "hot-mice-play", @@ -98,6 +104,7 @@ "lazy-ladybugs-return", "little-ravens-yawn", "long-lizards-admire", + "loud-mayflies-divide", "lovely-buses-boil", "lovely-fireants-behave", "lucky-clocks-love", @@ -108,6 +115,7 @@ "mean-seals-nail", "metal-cats-double", "metal-hounds-drum", + "metal-pots-notice", "metal-wombats-judge", "mighty-eels-type", "modern-bikes-build", @@ -117,6 +125,7 @@ "nasty-trains-drop", "nasty-waves-divide", "nervous-walls-knock", + "new-falcons-fail", "nice-avocados-poke", "nice-bikes-double", "nice-fishes-perform", @@ -131,6 +140,8 @@ "pink-fans-nail", "pink-horses-deny", "pink-tips-give", + "plenty-guests-hunt", + "poor-bags-stare", "popular-coins-invent", "pretty-hotels-drop", "proud-insects-perform", @@ -145,9 +156,11 @@ "real-ducks-hope", "real-students-exercise", "red-falcons-do", + "red-sheep-confess", "red-turkeys-develop", "rotten-beers-learn", "rotten-cats-lay", + "rude-cycles-travel", "selfish-cycles-retire", "serious-ads-trade", "serious-plants-itch", @@ -158,12 +171,14 @@ "short-dragons-shout", "shy-monkeys-wonder", "shy-sheep-wait", + "silent-carrots-glow", "silent-rice-argue", "silly-snakes-fold", "silver-dolls-shave", "silver-mangos-thank", "six-cats-agree", "six-kangaroos-sneeze", + "slimy-glasses-tickle", "small-boxes-rush", "small-chicken-repair", "small-pots-press", @@ -191,6 +206,8 @@ "thin-chairs-compare", "thin-rice-trade", "thin-terms-lay", + "thirty-cups-provide", + "three-lizards-shave", "tough-flowers-breathe", "tricky-beds-kiss", "tricky-carrots-talk", @@ -199,6 +216,7 @@ "tricky-kangaroos-love", "tricky-olives-stare", "tricky-oranges-pump", + "twelve-boats-kick", "twelve-monkeys-juggle", "twenty-birds-scream", "unlucky-cups-fetch", @@ -206,10 +224,13 @@ "violet-insects-press", "weak-mails-cross", "wicked-cheetahs-cough", + "wicked-pens-promise", "wicked-squids-do", "wicked-tigers-return", "wild-gorillas-care", "wild-nails-wonder", + "wild-squids-bathe", + "wise-cheetahs-add", "witty-jokes-serve", "witty-tigers-rest" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b5e92dc94..47289e98ddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,193 @@ +## Version 2.0.0-next.12 + +Release date: Fri Oct 20 2023 + +### Major changes + +**[feat(store): default off storeArgument (#1741)](https://github.com/latticexyz/mud/commit/7ce82b6fc6bbf390ae159fe990d5d4fca5a4b0cb)** (@latticexyz/cli, @latticexyz/store, @latticexyz/world-modules, @latticexyz/world, create-mud) + +Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + +If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + +If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + +```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; ++ import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { ++ StoreSwitch.setStoreAddress(worldAddress); ++ ++ SomeTable.get(someKey); +``` + +**[feat(cli): declarative deployment (#1702)](https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f)** (@latticexyz/cli) + +`deploy`, `test`, `dev-contracts` were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc. + +The following CLI arguments are now removed from these commands: + +- `--debug` (you can now adjust CLI output with `DEBUG` environment variable, e.g. `DEBUG=mud:*`) +- `--priorityFeeMultiplier` (now calculated automatically) +- `--disableTxWait` (everything is now parallelized with smarter nonce management) +- `--pollInterval` (we now lean on viem defaults and we don't wait/poll until the very end of the deploy) + +Most deployment-in-progress logs are now behind a [debug](https://github.com/debug-js/debug) flag, which you can enable with a `DEBUG=mud:*` environment variable. + +**[feat(world-modules): only install modules once (#1756)](https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72)** (@latticexyz/world-modules) + +Modules now revert with `Module_AlreadyInstalled` if attempting to install more than once with the same calldata. + +This is a temporary workaround for our deploy pipeline. We'll make these install steps more idempotent in the future. + +### Minor changes + +**[docs(world): add changeset for system call helpers (#1747)](https://github.com/latticexyz/mud/commit/7fa2ca1831234b54a55c20632d29877e5e711eb7)** (@latticexyz/world) + +Added TS helpers for calling systems dynamically via the World. + +- `encodeSystemCall` for `world.call` + + ```ts + worldContract.write.call(encodeSystemCall({ + abi: worldContract.abi, + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + +- `encodeSystemCallFrom` for `world.callFrom` + + ```ts + worldContract.write.callFrom(encodeSystemCallFrom({ + abi: worldContract.abi, + from: "0x...", + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + +- `encodeSystemCalls` for `world.batchCall` + + ```ts + worldContract.write.batchCall(encodeSystemCalls(abi, [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + +- `encodeSystemCallsFrom` for `world.batchCallFrom` + ```ts + worldContract.write.batchCallFrom(encodeSystemCallsFrom(abi, "0x...", [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + +**[feat(world-modules): only install modules once (#1756)](https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72)** (@latticexyz/world) + +Added a `Module_AlreadyInstalled` error to `IModule`. + +**[feat(common): add sendTransaction, add mempool queue to nonce manager (#1717)](https://github.com/latticexyz/mud/commit/0660561545910b03f8358e5ed7698f74e64f955b)** (@latticexyz/common) + +- Added a `sendTransaction` helper to mirror viem's `sendTransaction`, but with our nonce manager +- Added an internal mempool queue to `sendTransaction` and `writeContract` for better nonce handling +- Defaults block tag to `pending` for transaction simulation and transaction count (when initializing the nonce manager) + +**[feat(cli): add `--alwaysPostDeploy` flag to deploys (#1765)](https://github.com/latticexyz/mud/commit/ccc21e91387cb09de9dc56729983776eb9bcdcc4)** (@latticexyz/cli) + +Added a `--alwaysRunPostDeploy` flag to deploys (`deploy`, `test`, `dev-contracts` commands) to always run `PostDeploy.s.sol` script after each deploy. By default, `PostDeploy.s.sol` is only run once after a new world is deployed. + +This is helpful if you want to continue a deploy that may not have finished (due to an error or otherwise) or to run deploys with an idempotent `PostDeploy.s.sol` script. + +**[feat(abi-ts): move logs to debug (#1736)](https://github.com/latticexyz/mud/commit/ca32917519eb9065829f11af105abbbb31d6efa2)** (@latticexyz/abi-ts) + +Moves log output behind a debug flag. You can enable logging with `DEBUG=abi-ts` environment variable. + +**[feat(cli): remove forge clean from deploy (#1759)](https://github.com/latticexyz/mud/commit/e667ee808b5362ff215ba3faea028b526660eccb)** (@latticexyz/cli) + +CLI `deploy`, `test`, `dev-contracts` no longer run `forge clean` before each deploy. We previously cleaned to ensure no outdated artifacts were checked into git (ABIs, typechain types, etc.). Now that all artifacts are gitignored, we can let forge use its cache again. + +**[feat(common): clarify resourceId (hex) from resource (object) (#1706)](https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee)** (@latticexyz/common) + +Renames `resourceIdToHex` to `resourceToHex` and `hexToResourceId` to `hexToResource`, to better distinguish between a resource ID (hex value) and a resource reference (type, namespace, name). + +```diff +- resourceIdToHex({ type: 'table', namespace: '', name: 'Position' }); ++ resourceToHex({ type: 'table', namespace: '', name: 'Position' }); +``` + +```diff +- hexToResourceId('0x...'); ++ hexToResource('0x...'); +``` + +Previous methods still exist but are now deprecated to ease migration and reduce breaking changes. These will be removed in a future version. + +Also removes the previously deprecated and unused table ID utils (replaced by these resource ID utils). + +**[feat(cli): remove .mudtest file in favor of env var (#1722)](https://github.com/latticexyz/mud/commit/25086be5f34d7289f21395595ac8a6aeabfe9b7c)** (@latticexyz/cli, @latticexyz/common, @latticexyz/world) + +Replaced temporary `.mudtest` file in favor of `WORLD_ADDRESS` environment variable when running tests with `MudTest` contract + +**[feat(faucet,store-indexer): add k8s healthcheck endpoints (#1739)](https://github.com/latticexyz/mud/commit/1d0f7e22b7fb8f6295b149a6584933a3a657ec08)** (@latticexyz/faucet, @latticexyz/store-indexer) + +Added `/healthz` and `/readyz` healthcheck endpoints for Kubernetes + +**[feat(cli): add retries to deploy (#1766)](https://github.com/latticexyz/mud/commit/e1dc88ebe7f66e4ece13805643e932e038863b6e)** (@latticexyz/cli) + +Transactions sent via deploy will now be retried a few times before giving up. This hopefully helps with large deploys on some chains. + +### Patch changes + +**[feat(store): parallelize table codegen (#1754)](https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353)** (@latticexyz/store) + +Parallelized table codegen. Also put logs behind debug flag, which can be enabled using the `DEBUG=mud:*` environment variable. + +**[fix(cli): handle module already installed (#1769)](https://github.com/latticexyz/mud/commit/4e2a170f9185a03c2c504912e3d738f06b45137b)** (@latticexyz/cli) + +Deploys now continue if they detect a `Module_AlreadyInstalled` revert error. + +**[fix(cli): deploy systems/modules before registering/installing them (#1767)](https://github.com/latticexyz/mud/commit/61c6ab70555dc29e8e9428212ee710d7af681cc9)** (@latticexyz/cli) + +Changed deploy order so that system/module contracts are fully deployed before registering/installing them on the world. + +**[feat(store): parallelize table codegen (#1754)](https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353)** (@latticexyz/common) + +Moved some codegen to use `fs/promises` for better parallelism. + +**[fix(cli): support enums in deploy, only deploy modules/systems once (#1749)](https://github.com/latticexyz/mud/commit/4fe079309fae04ffd2e611311937906f65bf91e6)** (@latticexyz/cli) + +Fixed a few issues with deploys: + +- properly handle enums in MUD config +- only deploy each unique module/system once +- waits for transactions serially instead of in parallel, to avoid RPC errors + +**[feat(cli,create-mud): use forge cache (#1777)](https://github.com/latticexyz/mud/commit/d844cd441c40264ddc90d023e4354adea617febd)** (@latticexyz/cli, create-mud) + +Sped up builds by using more of forge's cache. + +Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones. + +**[feat(cli): declarative deployment (#1702)](https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f)** (@latticexyz/world) + +With [resource types in resource IDs](https://github.com/latticexyz/mud/pull/1544), the World config no longer requires table and system names to be unique. + +**[feat(common): clarify resourceId (hex) from resource (object) (#1706)](https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee)** (@latticexyz/cli, @latticexyz/dev-tools, @latticexyz/store-sync) + +Moved to new resource ID utils. + +--- + ## Version 2.0.0-next.11 ### Major changes diff --git a/docs/pages/changelog.mdx b/docs/pages/changelog.mdx index 68b5e92dc94..47289e98ddd 100644 --- a/docs/pages/changelog.mdx +++ b/docs/pages/changelog.mdx @@ -1,3 +1,193 @@ +## Version 2.0.0-next.12 + +Release date: Fri Oct 20 2023 + +### Major changes + +**[feat(store): default off storeArgument (#1741)](https://github.com/latticexyz/mud/commit/7ce82b6fc6bbf390ae159fe990d5d4fca5a4b0cb)** (@latticexyz/cli, @latticexyz/store, @latticexyz/world-modules, @latticexyz/world, create-mud) + +Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + +If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + +If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + +```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; ++ import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { ++ StoreSwitch.setStoreAddress(worldAddress); ++ ++ SomeTable.get(someKey); +``` + +**[feat(cli): declarative deployment (#1702)](https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f)** (@latticexyz/cli) + +`deploy`, `test`, `dev-contracts` were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc. + +The following CLI arguments are now removed from these commands: + +- `--debug` (you can now adjust CLI output with `DEBUG` environment variable, e.g. `DEBUG=mud:*`) +- `--priorityFeeMultiplier` (now calculated automatically) +- `--disableTxWait` (everything is now parallelized with smarter nonce management) +- `--pollInterval` (we now lean on viem defaults and we don't wait/poll until the very end of the deploy) + +Most deployment-in-progress logs are now behind a [debug](https://github.com/debug-js/debug) flag, which you can enable with a `DEBUG=mud:*` environment variable. + +**[feat(world-modules): only install modules once (#1756)](https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72)** (@latticexyz/world-modules) + +Modules now revert with `Module_AlreadyInstalled` if attempting to install more than once with the same calldata. + +This is a temporary workaround for our deploy pipeline. We'll make these install steps more idempotent in the future. + +### Minor changes + +**[docs(world): add changeset for system call helpers (#1747)](https://github.com/latticexyz/mud/commit/7fa2ca1831234b54a55c20632d29877e5e711eb7)** (@latticexyz/world) + +Added TS helpers for calling systems dynamically via the World. + +- `encodeSystemCall` for `world.call` + + ```ts + worldContract.write.call(encodeSystemCall({ + abi: worldContract.abi, + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + +- `encodeSystemCallFrom` for `world.callFrom` + + ```ts + worldContract.write.callFrom(encodeSystemCallFrom({ + abi: worldContract.abi, + from: "0x...", + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + +- `encodeSystemCalls` for `world.batchCall` + + ```ts + worldContract.write.batchCall(encodeSystemCalls(abi, [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + +- `encodeSystemCallsFrom` for `world.batchCallFrom` + ```ts + worldContract.write.batchCallFrom(encodeSystemCallsFrom(abi, "0x...", [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + +**[feat(world-modules): only install modules once (#1756)](https://github.com/latticexyz/mud/commit/6ca1874e02161c8feb08b5fafb20b57ce0c8fe72)** (@latticexyz/world) + +Added a `Module_AlreadyInstalled` error to `IModule`. + +**[feat(common): add sendTransaction, add mempool queue to nonce manager (#1717)](https://github.com/latticexyz/mud/commit/0660561545910b03f8358e5ed7698f74e64f955b)** (@latticexyz/common) + +- Added a `sendTransaction` helper to mirror viem's `sendTransaction`, but with our nonce manager +- Added an internal mempool queue to `sendTransaction` and `writeContract` for better nonce handling +- Defaults block tag to `pending` for transaction simulation and transaction count (when initializing the nonce manager) + +**[feat(cli): add `--alwaysPostDeploy` flag to deploys (#1765)](https://github.com/latticexyz/mud/commit/ccc21e91387cb09de9dc56729983776eb9bcdcc4)** (@latticexyz/cli) + +Added a `--alwaysRunPostDeploy` flag to deploys (`deploy`, `test`, `dev-contracts` commands) to always run `PostDeploy.s.sol` script after each deploy. By default, `PostDeploy.s.sol` is only run once after a new world is deployed. + +This is helpful if you want to continue a deploy that may not have finished (due to an error or otherwise) or to run deploys with an idempotent `PostDeploy.s.sol` script. + +**[feat(abi-ts): move logs to debug (#1736)](https://github.com/latticexyz/mud/commit/ca32917519eb9065829f11af105abbbb31d6efa2)** (@latticexyz/abi-ts) + +Moves log output behind a debug flag. You can enable logging with `DEBUG=abi-ts` environment variable. + +**[feat(cli): remove forge clean from deploy (#1759)](https://github.com/latticexyz/mud/commit/e667ee808b5362ff215ba3faea028b526660eccb)** (@latticexyz/cli) + +CLI `deploy`, `test`, `dev-contracts` no longer run `forge clean` before each deploy. We previously cleaned to ensure no outdated artifacts were checked into git (ABIs, typechain types, etc.). Now that all artifacts are gitignored, we can let forge use its cache again. + +**[feat(common): clarify resourceId (hex) from resource (object) (#1706)](https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee)** (@latticexyz/common) + +Renames `resourceIdToHex` to `resourceToHex` and `hexToResourceId` to `hexToResource`, to better distinguish between a resource ID (hex value) and a resource reference (type, namespace, name). + +```diff +- resourceIdToHex({ type: 'table', namespace: '', name: 'Position' }); ++ resourceToHex({ type: 'table', namespace: '', name: 'Position' }); +``` + +```diff +- hexToResourceId('0x...'); ++ hexToResource('0x...'); +``` + +Previous methods still exist but are now deprecated to ease migration and reduce breaking changes. These will be removed in a future version. + +Also removes the previously deprecated and unused table ID utils (replaced by these resource ID utils). + +**[feat(cli): remove .mudtest file in favor of env var (#1722)](https://github.com/latticexyz/mud/commit/25086be5f34d7289f21395595ac8a6aeabfe9b7c)** (@latticexyz/cli, @latticexyz/common, @latticexyz/world) + +Replaced temporary `.mudtest` file in favor of `WORLD_ADDRESS` environment variable when running tests with `MudTest` contract + +**[feat(faucet,store-indexer): add k8s healthcheck endpoints (#1739)](https://github.com/latticexyz/mud/commit/1d0f7e22b7fb8f6295b149a6584933a3a657ec08)** (@latticexyz/faucet, @latticexyz/store-indexer) + +Added `/healthz` and `/readyz` healthcheck endpoints for Kubernetes + +**[feat(cli): add retries to deploy (#1766)](https://github.com/latticexyz/mud/commit/e1dc88ebe7f66e4ece13805643e932e038863b6e)** (@latticexyz/cli) + +Transactions sent via deploy will now be retried a few times before giving up. This hopefully helps with large deploys on some chains. + +### Patch changes + +**[feat(store): parallelize table codegen (#1754)](https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353)** (@latticexyz/store) + +Parallelized table codegen. Also put logs behind debug flag, which can be enabled using the `DEBUG=mud:*` environment variable. + +**[fix(cli): handle module already installed (#1769)](https://github.com/latticexyz/mud/commit/4e2a170f9185a03c2c504912e3d738f06b45137b)** (@latticexyz/cli) + +Deploys now continue if they detect a `Module_AlreadyInstalled` revert error. + +**[fix(cli): deploy systems/modules before registering/installing them (#1767)](https://github.com/latticexyz/mud/commit/61c6ab70555dc29e8e9428212ee710d7af681cc9)** (@latticexyz/cli) + +Changed deploy order so that system/module contracts are fully deployed before registering/installing them on the world. + +**[feat(store): parallelize table codegen (#1754)](https://github.com/latticexyz/mud/commit/f62c767e7ff3bda807c592d85227221a00dd9353)** (@latticexyz/common) + +Moved some codegen to use `fs/promises` for better parallelism. + +**[fix(cli): support enums in deploy, only deploy modules/systems once (#1749)](https://github.com/latticexyz/mud/commit/4fe079309fae04ffd2e611311937906f65bf91e6)** (@latticexyz/cli) + +Fixed a few issues with deploys: + +- properly handle enums in MUD config +- only deploy each unique module/system once +- waits for transactions serially instead of in parallel, to avoid RPC errors + +**[feat(cli,create-mud): use forge cache (#1777)](https://github.com/latticexyz/mud/commit/d844cd441c40264ddc90d023e4354adea617febd)** (@latticexyz/cli, create-mud) + +Sped up builds by using more of forge's cache. + +Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones. + +**[feat(cli): declarative deployment (#1702)](https://github.com/latticexyz/mud/commit/29c3f5087017dbc9dc2c9160e10bfbac5806741f)** (@latticexyz/world) + +With [resource types in resource IDs](https://github.com/latticexyz/mud/pull/1544), the World config no longer requires table and system names to be unique. + +**[feat(common): clarify resourceId (hex) from resource (object) (#1706)](https://github.com/latticexyz/mud/commit/d2f8e940048e56d9be204bf5b2cbcf8d29cc1dee)** (@latticexyz/cli, @latticexyz/dev-tools, @latticexyz/store-sync) + +Moved to new resource ID utils. + +--- + ## Version 2.0.0-next.11 ### Major changes diff --git a/packages/abi-ts/CHANGELOG.md b/packages/abi-ts/CHANGELOG.md index 0a87c998a36..07767ee824d 100644 --- a/packages/abi-ts/CHANGELOG.md +++ b/packages/abi-ts/CHANGELOG.md @@ -1,5 +1,11 @@ # @latticexyz/abi-ts +## 2.0.0-next.12 + +### Minor Changes + +- ca329175: Moves log output behind a debug flag. You can enable logging with `DEBUG=abi-ts` environment variable. + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/abi-ts/package.json b/packages/abi-ts/package.json index a2bd75a98bc..9b6ffc048e3 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.11", + "version": "2.0.0-next.12", "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 19e9d62390d..20d1b42ae8c 100644 --- a/packages/block-logs-stream/CHANGELOG.md +++ b/packages/block-logs-stream/CHANGELOG.md @@ -1,5 +1,15 @@ # @latticexyz/block-logs-stream +## 2.0.0-next.12 + +### Patch Changes + +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] + - @latticexyz/common@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index c15804a37a0..72b3160d017 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.11", + "version": "2.0.0-next.12", "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 42808098c78..1d94b37c2e9 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,87 @@ # Change Log +## 2.0.0-next.12 + +### Major Changes + +- 29c3f508: `deploy`, `test`, `dev-contracts` were overhauled using a declarative deployment approach under the hood. Deploys are now idempotent and re-running them will introspect the world and figure out the minimal changes necessary to bring the world into alignment with its config: adding tables, adding/upgrading systems, changing access control, etc. + + The following CLI arguments are now removed from these commands: + + - `--debug` (you can now adjust CLI output with `DEBUG` environment variable, e.g. `DEBUG=mud:*`) + - `--priorityFeeMultiplier` (now calculated automatically) + - `--disableTxWait` (everything is now parallelized with smarter nonce management) + - `--pollInterval` (we now lean on viem defaults and we don't wait/poll until the very end of the deploy) + + Most deployment-in-progress logs are now behind a [debug](https://github.com/debug-js/debug) flag, which you can enable with a `DEBUG=mud:*` environment variable. + +### Minor Changes + +- ccc21e91: Added a `--alwaysRunPostDeploy` flag to deploys (`deploy`, `test`, `dev-contracts` commands) to always run `PostDeploy.s.sol` script after each deploy. By default, `PostDeploy.s.sol` is only run once after a new world is deployed. + + This is helpful if you want to continue a deploy that may not have finished (due to an error or otherwise) or to run deploys with an idempotent `PostDeploy.s.sol` script. + +- e667ee80: CLI `deploy`, `test`, `dev-contracts` no longer run `forge clean` before each deploy. We previously cleaned to ensure no outdated artifacts were checked into git (ABIs, typechain types, etc.). Now that all artifacts are gitignored, we can let forge use its cache again. +- e1dc88eb: Transactions sent via deploy will now be retried a few times before giving up. This hopefully helps with large deploys on some chains. + +### Patch Changes + +- 7ce82b6f: Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + + If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + + If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + + ```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; + + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { + + StoreSwitch.setStoreAddress(worldAddress); + + + + SomeTable.get(someKey); + ``` + +- 4e2a170f: Deploys now continue if they detect a `Module_AlreadyInstalled` revert error. +- 61c6ab70: Changed deploy order so that system/module contracts are fully deployed before registering/installing them on the world. +- 4fe07930: Fixed a few issues with deploys: + + - properly handle enums in MUD config + - only deploy each unique module/system once + - waits for transactions serially instead of in parallel, to avoid RPC errors + +- d844cd44: Sped up builds by using more of forge's cache. + + Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones. + +- 25086be5: Replaced temporary `.mudtest` file in favor of `WORLD_ADDRESS` environment variable when running tests with `MudTest` contract +- d2f8e940: Moved to new resource ID utils. +- Updated dependencies [7ce82b6f] +- Updated dependencies [7fa2ca18] +- Updated dependencies [6ca1874e] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [ca329175] +- Updated dependencies [f62c767e] +- Updated dependencies [6ca1874e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] +- Updated dependencies [29c3f508] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/world-modules@2.0.0-next.12 + - @latticexyz/world@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/abi-ts@2.0.0-next.12 + - @latticexyz/config@2.0.0-next.12 + - @latticexyz/protocol-parser@2.0.0-next.12 + - @latticexyz/gas-report@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + - @latticexyz/services@2.0.0-next.12 + - @latticexyz/utils@2.0.0-next.12 + ## 2.0.0-next.11 ### Major Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 58405158ef1..4c6b5a74ff0 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index dd4a2461a62..423c7a176ff 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,34 @@ # Change Log +## 2.0.0-next.12 + +### Minor Changes + +- 06605615: - Added a `sendTransaction` helper to mirror viem's `sendTransaction`, but with our nonce manager + - Added an internal mempool queue to `sendTransaction` and `writeContract` for better nonce handling + - Defaults block tag to `pending` for transaction simulation and transaction count (when initializing the nonce manager) +- d2f8e940: Renames `resourceIdToHex` to `resourceToHex` and `hexToResourceId` to `hexToResource`, to better distinguish between a resource ID (hex value) and a resource reference (type, namespace, name). + + ```diff + - resourceIdToHex({ type: 'table', namespace: '', name: 'Position' }); + + resourceToHex({ type: 'table', namespace: '', name: 'Position' }); + ``` + + ```diff + - hexToResourceId('0x...'); + + hexToResource('0x...'); + ``` + + Previous methods still exist but are now deprecated to ease migration and reduce breaking changes. These will be removed in a future version. + + Also removes the previously deprecated and unused table ID utils (replaced by these resource ID utils). + +### Patch Changes + +- f62c767e: Moved some codegen to use `fs/promises` for better parallelism. +- 25086be5: Replaced temporary `.mudtest` file in favor of `WORLD_ADDRESS` environment variable when running tests with `MudTest` contract + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Minor Changes diff --git a/packages/common/package.json b/packages/common/package.json index d714d9f573b..39afa509042 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/common", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "Common low level logic shared between packages", "repository": { "type": "git", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 43ea9915e4e..5e729fc2111 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 2.0.0-next.12 + +### Patch Changes + +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 0a28220db6b..a335b9d39bc 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/config", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "Config for Store and World", "repository": { "type": "git", diff --git a/packages/create-mud/CHANGELOG.md b/packages/create-mud/CHANGELOG.md index 4f277f57196..666f04ec2fc 100644 --- a/packages/create-mud/CHANGELOG.md +++ b/packages/create-mud/CHANGELOG.md @@ -1,5 +1,32 @@ # Change Log +## 2.0.0-next.12 + +### Patch Changes + +- 7ce82b6f: Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + + If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + + If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + + ```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; + + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { + + StoreSwitch.setStoreAddress(worldAddress); + + + + SomeTable.get(someKey); + ``` + +- d844cd44: Sped up builds by using more of forge's cache. + + Previously we'd build only what we needed because we would check in ABIs and other build artifacts into git, but that meant that we'd get a lot of forge cache misses. Now that we no longer need these files visible, we can take advantage of forge's caching and greatly speed up builds, especially incremental ones. + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/create-mud/package.json b/packages/create-mud/package.json index 2aaf771f780..50ac9ff2c07 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.11", + "version": "2.0.0-next.12", "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 8168db192ac..f92cca33a5f 100644 --- a/packages/dev-tools/CHANGELOG.md +++ b/packages/dev-tools/CHANGELOG.md @@ -1,5 +1,28 @@ # @latticexyz/dev-tools +## 2.0.0-next.12 + +### Patch Changes + +- d2f8e940: Moved to new resource ID utils. +- Updated dependencies [7ce82b6f] +- Updated dependencies [7fa2ca18] +- Updated dependencies [6ca1874e] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] +- Updated dependencies [29c3f508] +- Updated dependencies [d2f8e940] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/world@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/store-sync@2.0.0-next.12 + - @latticexyz/react@2.0.0-next.12 + - @latticexyz/recs@2.0.0-next.12 + - @latticexyz/utils@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index 433ba566767..91b69bf074c 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.11", + "version": "2.0.0-next.12", "description": "MUD developer tools", "repository": { "type": "git", @@ -50,12 +50,12 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/common": "2.0.0-next.11", - "@latticexyz/recs": "2.0.0-next.11", - "@latticexyz/store": "2.0.0-next.11", - "@latticexyz/store-sync": "2.0.0-next.11", - "@latticexyz/utils": "2.0.0-next.11", - "@latticexyz/world": "2.0.0-next.11" + "@latticexyz/common": "2.0.0-next.12", + "@latticexyz/recs": "2.0.0-next.12", + "@latticexyz/store": "2.0.0-next.12", + "@latticexyz/store-sync": "2.0.0-next.12", + "@latticexyz/utils": "2.0.0-next.12", + "@latticexyz/world": "2.0.0-next.12" }, "publishConfig": { "access": "public" diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index 157df98b7ea..cba492e611d 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/ecs-browser +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index 028e3599992..35a52fe2150 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.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/faucet/CHANGELOG.md b/packages/faucet/CHANGELOG.md index b2fe964278c..05f8a1e1519 100644 --- a/packages/faucet/CHANGELOG.md +++ b/packages/faucet/CHANGELOG.md @@ -1,5 +1,11 @@ # @latticexyz/faucet +## 2.0.0-next.12 + +### Minor Changes + +- 1d0f7e22: Added `/healthz` and `/readyz` healthcheck endpoints for Kubernetes + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/faucet/package.json b/packages/faucet/package.json index f628814889b..9e74955f2d5 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/faucet", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "Faucet API for Lattice testnet", "repository": { "type": "git", diff --git a/packages/gas-report/CHANGELOG.md b/packages/gas-report/CHANGELOG.md index 50d945c4d6f..c77560338d7 100644 --- a/packages/gas-report/CHANGELOG.md +++ b/packages/gas-report/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.12 + ## 2.0.0-next.11 ### Minor Changes diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index c4d5f1c914e..a458228147d 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.11", + "version": "2.0.0-next.12", "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 22843aa4999..c0e3c75dc99 100644 --- a/packages/network/CHANGELOG.md +++ b/packages/network/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/network +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/network/package.json b/packages/network/package.json index 42985be783e..e558cf5032e 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/network", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/noise/CHANGELOG.md b/packages/noise/CHANGELOG.md index bd2fefe837e..e00d038dd21 100644 --- a/packages/noise/CHANGELOG.md +++ b/packages/noise/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/noise/package.json b/packages/noise/package.json index 82ba0d968f3..34afeb292a9 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/noise", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "license": "MIT", "type": "module", "exports": { diff --git a/packages/phaserx/CHANGELOG.md b/packages/phaserx/CHANGELOG.md index d8487bb999d..fdfd0521123 100644 --- a/packages/phaserx/CHANGELOG.md +++ b/packages/phaserx/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 2.0.0-next.12 + +### Patch Changes + +- @latticexyz/utils@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/phaserx/package.json b/packages/phaserx/package.json index 31be4ae6bb9..682f6b443f1 100644 --- a/packages/phaserx/package.json +++ b/packages/phaserx/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/phaserx", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "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 ddf3f53da67..d847173b349 100644 --- a/packages/protocol-parser/CHANGELOG.md +++ b/packages/protocol-parser/CHANGELOG.md @@ -1,5 +1,16 @@ # @latticexyz/protocol-parser +## 2.0.0-next.12 + +### Patch Changes + +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index c8bb299a712..73996e4380a 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.11", + "version": "2.0.0-next.12", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 330921b5eaf..898a4318a22 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 2.0.0-next.12 + +### Patch Changes + +- Updated dependencies [7ce82b6f] +- Updated dependencies [f62c767e] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/recs@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index c9535acd09c..a818a80b5cf 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/react", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "React tools for MUD client.", "repository": { "type": "git", diff --git a/packages/recs/CHANGELOG.md b/packages/recs/CHANGELOG.md index 9bb7dc8fa2b..f45017b4781 100644 --- a/packages/recs/CHANGELOG.md +++ b/packages/recs/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.12 + +### Patch Changes + +- @latticexyz/schema-type@2.0.0-next.12 +- @latticexyz/utils@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/recs/package.json b/packages/recs/package.json index e0f64d9f108..a7ba7fe5398 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/recs", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "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 93fe5b64983..586237932de 100644 --- a/packages/schema-type/CHANGELOG.md +++ b/packages/schema-type/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index 8e5d3ff7e4f..bf9cc7b7a2e 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.11", + "version": "2.0.0-next.12", "description": "SchemaType enum for various languages", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index d607c14d667..7bc5d14ae18 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/services/package.json b/packages/services/package.json index d20f6e86c25..bd9bcc0dd26 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "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 532ec4d3e46..e3281cc00ff 100644 --- a/packages/solecs/CHANGELOG.md +++ b/packages/solecs/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/solecs +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/solecs/package.json b/packages/solecs/package.json index 378d397ddaf..2afd8b795a1 100644 --- a/packages/solecs/package.json +++ b/packages/solecs/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/solecs", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/solhint-config-mud/CHANGELOG.md b/packages/solhint-config-mud/CHANGELOG.md index 17c8da07828..5612268a880 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.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index b6c93cec60f..b254f1481b7 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.11", + "version": "2.0.0-next.12", "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 17c8da07828..5612268a880 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.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index 5504f0b4366..4e1231aadae 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.11", + "version": "2.0.0-next.12", "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 30b7f3b7137..561c97e8de7 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-client +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/std-client/package.json b/packages/std-client/package.json index c64cf50e0a8..fbdf43d587b 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.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/std-contracts/CHANGELOG.md b/packages/std-contracts/CHANGELOG.md index ee2613c2eba..565fffc1ec4 100644 --- a/packages/std-contracts/CHANGELOG.md +++ b/packages/std-contracts/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-contracts +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/std-contracts/package.json b/packages/std-contracts/package.json index dff9399ed17..bb963604083 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.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/store-cache/CHANGELOG.md b/packages/store-cache/CHANGELOG.md index df007de0f28..15bb1e9c749 100644 --- a/packages/store-cache/CHANGELOG.md +++ b/packages/store-cache/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/store-cache +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/store-cache/package.json b/packages/store-cache/package.json index 1f016ea247e..3dd2877ddbb 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.11", + "version": "2.0.0-next.12", "private": true } diff --git a/packages/store-indexer/CHANGELOG.md b/packages/store-indexer/CHANGELOG.md index 501e8c585e7..7acada1d3ca 100644 --- a/packages/store-indexer/CHANGELOG.md +++ b/packages/store-indexer/CHANGELOG.md @@ -1,5 +1,25 @@ # @latticexyz/store-indexer +## 2.0.0-next.12 + +### Minor Changes + +- 1d0f7e22: Added `/healthz` and `/readyz` healthcheck endpoints for Kubernetes + +### Patch Changes + +- Updated dependencies [7ce82b6f] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] +- Updated dependencies [d2f8e940] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/store-sync@2.0.0-next.12 + - @latticexyz/block-logs-stream@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index 30b68cfabda..344091627d5 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.11", + "version": "2.0.0-next.12", "description": "Minimal Typescript indexer for Store", "repository": { "type": "git", diff --git a/packages/store-sync/CHANGELOG.md b/packages/store-sync/CHANGELOG.md index a87750dec92..fa1a070d098 100644 --- a/packages/store-sync/CHANGELOG.md +++ b/packages/store-sync/CHANGELOG.md @@ -1,5 +1,27 @@ # @latticexyz/store-sync +## 2.0.0-next.12 + +### Patch Changes + +- d2f8e940: Moved to new resource ID utils. +- Updated dependencies [7ce82b6f] +- Updated dependencies [7fa2ca18] +- Updated dependencies [6ca1874e] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] +- Updated dependencies [29c3f508] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/world@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/block-logs-stream@2.0.0-next.12 + - @latticexyz/protocol-parser@2.0.0-next.12 + - @latticexyz/recs@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index 76127ffffcb..4d4bb772b10 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.11", + "version": "2.0.0-next.12", "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 3590a1d04a2..ce845d87435 100644 --- a/packages/store/CHANGELOG.md +++ b/packages/store/CHANGELOG.md @@ -1,5 +1,39 @@ # Change Log +## 2.0.0-next.12 + +### Major Changes + +- 7ce82b6f: Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + + If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + + If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + + ```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; + + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { + + StoreSwitch.setStoreAddress(worldAddress); + + + + SomeTable.get(someKey); + ``` + +### Patch Changes + +- f62c767e: Parallelized table codegen. Also put logs behind debug flag, which can be enabled using the `DEBUG=mud:*` environment variable. +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/config@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/store/package.json b/packages/store/package.json index 8f94898c8bd..f231b25388d 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "Store", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index be636b805c4..a9482c26619 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.12 + ## 2.0.0-next.11 ## 2.0.0-next.10 diff --git a/packages/utils/package.json b/packages/utils/package.json index 80b80a42d1f..b00e20874c0 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/utils", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/world-modules/CHANGELOG.md b/packages/world-modules/CHANGELOG.md index a45a80d6dd1..6d16878ded1 100644 --- a/packages/world-modules/CHANGELOG.md +++ b/packages/world-modules/CHANGELOG.md @@ -1,5 +1,49 @@ # Change Log +## 2.0.0-next.12 + +### Major Changes + +- 6ca1874e: Modules now revert with `Module_AlreadyInstalled` if attempting to install more than once with the same calldata. + + This is a temporary workaround for our deploy pipeline. We'll make these install steps more idempotent in the future. + +### Patch Changes + +- 7ce82b6f: Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + + If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + + If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + + ```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; + + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { + + StoreSwitch.setStoreAddress(worldAddress); + + + + SomeTable.get(someKey); + ``` + +- Updated dependencies [7ce82b6f] +- Updated dependencies [7fa2ca18] +- Updated dependencies [6ca1874e] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] +- Updated dependencies [29c3f508] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/world@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/config@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Minor Changes diff --git a/packages/world-modules/package.json b/packages/world-modules/package.json index f3962221a26..d659e0ec468 100644 --- a/packages/world-modules/package.json +++ b/packages/world-modules/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world-modules", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "World modules", "repository": { "type": "git", diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md index 106055aea77..e30d8f85fdc 100644 --- a/packages/world/CHANGELOG.md +++ b/packages/world/CHANGELOG.md @@ -1,5 +1,89 @@ # Change Log +## 2.0.0-next.12 + +### Minor Changes + +- 7fa2ca18: Added TS helpers for calling systems dynamically via the World. + + - `encodeSystemCall` for `world.call` + + ```ts + worldContract.write.call(encodeSystemCall({ + abi: worldContract.abi, + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + + - `encodeSystemCallFrom` for `world.callFrom` + + ```ts + worldContract.write.callFrom(encodeSystemCallFrom({ + abi: worldContract.abi, + from: "0x...", + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + })); + ``` + + - `encodeSystemCalls` for `world.batchCall` + + ```ts + worldContract.write.batchCall(encodeSystemCalls(abi, [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + + - `encodeSystemCallsFrom` for `world.batchCallFrom` + ```ts + worldContract.write.batchCallFrom(encodeSystemCallsFrom(abi, "0x...", [{ + systemId: resourceToHex({ ... }), + functionName: "registerDelegation", + args: [ ... ], + }])); + ``` + +- 6ca1874e: Added a `Module_AlreadyInstalled` error to `IModule`. +- 25086be5: Replaced temporary `.mudtest` file in favor of `WORLD_ADDRESS` environment variable when running tests with `MudTest` contract + +### Patch Changes + +- 7ce82b6f: Store config now defaults `storeArgument: false` for all tables. This means that table libraries, by default, will no longer include the extra functions with the `_store` argument. This default was changed to clear up the confusion around using table libraries in tests, `PostDeploy` scripts, etc. + + If you are sure you need to manually specify a store when interacting with tables, you can still manually toggle it back on with `storeArgument: true` in the table settings of your MUD config. + + If you want to use table libraries in `PostDeploy.s.sol`, you can add the following lines: + + ```diff + import { Script } from "forge-std/Script.sol"; + import { console } from "forge-std/console.sol"; + import { IWorld } from "../src/codegen/world/IWorld.sol"; + + import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + + contract PostDeploy is Script { + function run(address worldAddress) external { + + StoreSwitch.setStoreAddress(worldAddress); + + + + SomeTable.get(someKey); + ``` + +- 29c3f508: With [resource types in resource IDs](https://github.com/latticexyz/mud/pull/1544), the World config no longer requires table and system names to be unique. +- Updated dependencies [7ce82b6f] +- Updated dependencies [06605615] +- Updated dependencies [f62c767e] +- Updated dependencies [f62c767e] +- Updated dependencies [d2f8e940] +- Updated dependencies [25086be5] + - @latticexyz/store@2.0.0-next.12 + - @latticexyz/common@2.0.0-next.12 + - @latticexyz/config@2.0.0-next.12 + - @latticexyz/schema-type@2.0.0-next.12 + ## 2.0.0-next.11 ### Patch Changes diff --git a/packages/world/package.json b/packages/world/package.json index 8e636e2e2e9..596cf8ae471 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world", - "version": "2.0.0-next.11", + "version": "2.0.0-next.12", "description": "World framework", "repository": { "type": "git",