From ce12963adb1523fbc4b7b14fd130d23dadb1677e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Sep 2023 10:28:42 +0000 Subject: [PATCH] Version Packages (next) --- .changeset/pre.json | 4 +- CHANGELOG.md | 48 ++++++++++++++++++++ packages/abi-ts/CHANGELOG.md | 45 ++++++++++++++++++ packages/abi-ts/package.json | 2 +- packages/block-logs-stream/CHANGELOG.md | 9 ++++ packages/block-logs-stream/package.json | 2 +- packages/cli/CHANGELOG.md | 58 ++++++++++++++++++++++++ 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 | 44 ++++++++++++++++++ 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 | 51 +++++++++++++++++++++ packages/store/package.json | 2 +- packages/utils/CHANGELOG.md | 2 + packages/utils/package.json | 2 +- packages/world/CHANGELOG.md | 52 +++++++++++++++++++++ packages/world/package.json | 2 +- 58 files changed, 452 insertions(+), 35 deletions(-) create mode 100644 packages/abi-ts/CHANGELOG.md diff --git a/.changeset/pre.json b/.changeset/pre.json index bff5dcdc88b..b4b2281b6aa 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -28,7 +28,8 @@ "@latticexyz/store-indexer": "1.42.0", "@latticexyz/store-sync": "1.42.0", "@latticexyz/utils": "1.42.0", - "@latticexyz/world": "1.42.0" + "@latticexyz/world": "1.42.0", + "@latticexyz/abi-ts": "2.0.0-next.5" }, "changesets": [ "afraid-hotels-bathe", @@ -86,6 +87,7 @@ "selfish-cycles-retire", "seven-flies-chew", "sharp-worms-kneel", + "six-cats-agree", "smooth-elephants-wave", "smooth-pots-nail", "soft-boxes-smile", diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc88293689..4cefac6534c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,51 @@ +# Version 2.0.0-next.6 + +## Minor changes + +**[feat(cli,create-mud,store,world): add abi-ts to replace typechain (#1403)](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)** (@latticexyz/abi-ts, @latticexyz/cli, @latticexyz/store, @latticexyz/world, create-mud) + +Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + +If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + +```diff +-"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", ++"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", +-"build:abi": "forge clean && forge build", ++"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", ++"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", +-"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", +``` + +And update your client's `setupNetwork.ts` with: + +```diff +-import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; ++import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, +- abi: IWorld__factory.abi, ++ abi: IWorldAbi, +``` + +If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + +```ts +import { getContract } from "viem"; +import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + +const storeContract = getContract({ + abi: IStoreAbi, + ... +}); + +await storeContract.write.setRecord(...); +``` + +--- + # Version 2.0.0-next.5 ## Major changes diff --git a/packages/abi-ts/CHANGELOG.md b/packages/abi-ts/CHANGELOG.md new file mode 100644 index 00000000000..d02a51d146c --- /dev/null +++ b/packages/abi-ts/CHANGELOG.md @@ -0,0 +1,45 @@ +# @latticexyz/abi-ts + +## 2.0.0-next.6 + +### Minor Changes + +- [#1403](https://github.com/latticexyz/mud/pull/1403) [`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295) Thanks [@holic](https://github.com/holic)! - Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + + If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + + ```diff + -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", + +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", + -"build:abi": "forge clean && forge build", + +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", + +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", + -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", + ``` + + And update your client's `setupNetwork.ts` with: + + ```diff + -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; + +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, + - abi: IWorld__factory.abi, + + abi: IWorldAbi, + ``` + + If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + + ```ts + import { getContract } from "viem"; + import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + + const storeContract = getContract({ + abi: IStoreAbi, + ... + }); + + await storeContract.write.setRecord(...); + ``` diff --git a/packages/abi-ts/package.json b/packages/abi-ts/package.json index cbcf52a5a1c..e231789f492 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.5", + "version": "2.0.0-next.6", "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 9fe178d9235..de5052be6bd 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.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/config@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 71fcf0ccc6b..1fcbb31192d 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.5", + "version": "2.0.0-next.6", "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 63bfe4be387..9cdbb4bb614 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,63 @@ # Change Log +## 2.0.0-next.6 + +### Minor Changes + +- [#1403](https://github.com/latticexyz/mud/pull/1403) [`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295) Thanks [@holic](https://github.com/holic)! - Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + + If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + + ```diff + -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", + +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", + -"build:abi": "forge clean && forge build", + +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", + +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", + -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", + ``` + + And update your client's `setupNetwork.ts` with: + + ```diff + -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; + +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, + - abi: IWorld__factory.abi, + + abi: IWorldAbi, + ``` + + If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + + ```ts + import { getContract } from "viem"; + import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + + const storeContract = getContract({ + abi: IStoreAbi, + ... + }); + + await storeContract.write.setRecord(...); + ``` + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/abi-ts@2.0.0-next.6 + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/world@2.0.0-next.6 + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/config@2.0.0-next.6 + - @latticexyz/gas-report@2.0.0-next.6 + - @latticexyz/protocol-parser@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + - @latticexyz/services@2.0.0-next.6 + - @latticexyz/utils@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index c18f6188db9..8d7b0449db2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index c3b551122ff..8c7a5789316 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/common/package.json b/packages/common/package.json index e55e37a87b5..8abb4456ca8 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/common", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "Common low level logic shared between packages", "repository": { "type": "git", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 641441c06ea..9069767a78b 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 5df67c20277..878d9aba3d7 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/config", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "Config for Store and World", "repository": { "type": "git", diff --git a/packages/create-mud/CHANGELOG.md b/packages/create-mud/CHANGELOG.md index 7fc69586fd0..36ee1c52e1c 100644 --- a/packages/create-mud/CHANGELOG.md +++ b/packages/create-mud/CHANGELOG.md @@ -1,5 +1,49 @@ # Change Log +## 2.0.0-next.6 + +### Minor Changes + +- [#1403](https://github.com/latticexyz/mud/pull/1403) [`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295) Thanks [@holic](https://github.com/holic)! - Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + + If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + + ```diff + -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", + +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", + -"build:abi": "forge clean && forge build", + +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", + +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", + -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", + ``` + + And update your client's `setupNetwork.ts` with: + + ```diff + -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; + +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, + - abi: IWorld__factory.abi, + + abi: IWorldAbi, + ``` + + If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + + ```ts + import { getContract } from "viem"; + import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + + const storeContract = getContract({ + abi: IStoreAbi, + ... + }); + + await storeContract.write.setRecord(...); + ``` + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/create-mud/package.json b/packages/create-mud/package.json index 02d7476bc44..76ee8debefc 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.5", + "version": "2.0.0-next.6", "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 565c60eb774..7716f8a7ca9 100644 --- a/packages/dev-tools/CHANGELOG.md +++ b/packages/dev-tools/CHANGELOG.md @@ -1,5 +1,18 @@ # @latticexyz/dev-tools +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/world@2.0.0-next.6 + - @latticexyz/react@2.0.0-next.6 + - @latticexyz/store-sync@2.0.0-next.6 + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/recs@2.0.0-next.6 + - @latticexyz/utils@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index bbbbe5a7bf5..3ed3dbfb0d7 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.5", + "version": "2.0.0-next.6", "description": "MUD developer tools", "repository": { "type": "git", @@ -51,12 +51,12 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/common": "2.0.0-next.5", - "@latticexyz/recs": "2.0.0-next.5", - "@latticexyz/store": "2.0.0-next.5", - "@latticexyz/store-sync": "2.0.0-next.5", - "@latticexyz/utils": "2.0.0-next.5", - "@latticexyz/world": "2.0.0-next.5" + "@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" }, "publishConfig": { "access": "public" diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index 02344572bc2..7e717a09e00 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/ecs-browser +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index 49d7268750e..1427fe6859f 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.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/gas-report/CHANGELOG.md b/packages/gas-report/CHANGELOG.md index 1a110044a72..3ef0ef4eda3 100644 --- a/packages/gas-report/CHANGELOG.md +++ b/packages/gas-report/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index 156ad28b926..c1df12d7e5d 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.5", + "version": "2.0.0-next.6", "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 cf9e6dba8a4..c4381ab1153 100644 --- a/packages/network/CHANGELOG.md +++ b/packages/network/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/network +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/network/package.json b/packages/network/package.json index 8cd96418cc1..c3214807ba0 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/network", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/noise/CHANGELOG.md b/packages/noise/CHANGELOG.md index 5c1e20ab630..9cf926eccde 100644 --- a/packages/noise/CHANGELOG.md +++ b/packages/noise/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/noise/package.json b/packages/noise/package.json index 10549676ec6..c0bf7bc4e80 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/noise", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "license": "MIT", "type": "module", "exports": { diff --git a/packages/phaserx/CHANGELOG.md b/packages/phaserx/CHANGELOG.md index 18bebaaeb83..1dd3efb7c11 100644 --- a/packages/phaserx/CHANGELOG.md +++ b/packages/phaserx/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/utils@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/phaserx/package.json b/packages/phaserx/package.json index f26667b6899..6126e240e9a 100644 --- a/packages/phaserx/package.json +++ b/packages/phaserx/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/phaserx", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "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 557f2f441be..c3b034ea224 100644 --- a/packages/protocol-parser/CHANGELOG.md +++ b/packages/protocol-parser/CHANGELOG.md @@ -1,5 +1,13 @@ # @latticexyz/protocol-parser +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index 3fa8b4ff19c..7638c1a331a 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.5", + "version": "2.0.0-next.6", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index ebc7ea2ca6c..cdce34b9ccd 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/recs@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index b3780755bea..515ef0d74de 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/react", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "React tools for MUD client.", "repository": { "type": "git", diff --git a/packages/recs/CHANGELOG.md b/packages/recs/CHANGELOG.md index 3853bfd9433..75f481c621c 100644 --- a/packages/recs/CHANGELOG.md +++ b/packages/recs/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/schema-type@2.0.0-next.6 + - @latticexyz/utils@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/recs/package.json b/packages/recs/package.json index 12e3e315143..e6430318ac5 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/recs", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "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 dd349d31013..71b9295bd73 100644 --- a/packages/schema-type/CHANGELOG.md +++ b/packages/schema-type/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index 52110375d18..0a8cbd33cf1 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.5", + "version": "2.0.0-next.6", "description": "SchemaType enum for various languages", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index 3e284e05a01..259e51485b1 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/services/package.json b/packages/services/package.json index 0763ac49d8a..1e97f1712b4 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "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 3861d7519a3..6a586f3c620 100644 --- a/packages/solecs/CHANGELOG.md +++ b/packages/solecs/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/solecs +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/solecs/package.json b/packages/solecs/package.json index b78228af40d..75bef6743ca 100644 --- a/packages/solecs/package.json +++ b/packages/solecs/package.json @@ -1,5 +1,5 @@ { "name": "@latticexyz/solecs", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/solhint-config-mud/CHANGELOG.md b/packages/solhint-config-mud/CHANGELOG.md index ecb612012b1..5a2a195d5c7 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.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index 7415006f406..361103c512f 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.5", + "version": "2.0.0-next.6", "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 ecb612012b1..5a2a195d5c7 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.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index 4bac91dfcb3..0581e3f0116 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.5", + "version": "2.0.0-next.6", "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 8a3499aa5b0..d841d3e47fc 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-client +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/std-client/package.json b/packages/std-client/package.json index b551b4f70ed..e3026eb03fb 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.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/std-contracts/CHANGELOG.md b/packages/std-contracts/CHANGELOG.md index a4292704989..e4e38be5ae5 100644 --- a/packages/std-contracts/CHANGELOG.md +++ b/packages/std-contracts/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/std-contracts +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/std-contracts/package.json b/packages/std-contracts/package.json index e93d7552bd8..43013a8840f 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.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/store-cache/CHANGELOG.md b/packages/store-cache/CHANGELOG.md index fed2fc6479f..bf66896393f 100644 --- a/packages/store-cache/CHANGELOG.md +++ b/packages/store-cache/CHANGELOG.md @@ -1,5 +1,7 @@ # @latticexyz/store-cache +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/store-cache/package.json b/packages/store-cache/package.json index 9a3209bb667..ca568d7b170 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.5", + "version": "2.0.0-next.6", "private": true } diff --git a/packages/store-indexer/CHANGELOG.md b/packages/store-indexer/CHANGELOG.md index 51b19b5d29d..9687bc11a93 100644 --- a/packages/store-indexer/CHANGELOG.md +++ b/packages/store-indexer/CHANGELOG.md @@ -1,5 +1,15 @@ # @latticexyz/store-indexer +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/store-sync@2.0.0-next.6 + - @latticexyz/block-logs-stream@2.0.0-next.6 + - @latticexyz/common@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index e637cc412c4..322ac0a7695 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.5", + "version": "2.0.0-next.6", "description": "Minimal Typescript indexer for Store", "repository": { "type": "git", diff --git a/packages/store-sync/CHANGELOG.md b/packages/store-sync/CHANGELOG.md index 18afab971b6..5ea963f00e5 100644 --- a/packages/store-sync/CHANGELOG.md +++ b/packages/store-sync/CHANGELOG.md @@ -1,5 +1,18 @@ # @latticexyz/store-sync +## 2.0.0-next.6 + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/world@2.0.0-next.6 + - @latticexyz/block-logs-stream@2.0.0-next.6 + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/protocol-parser@2.0.0-next.6 + - @latticexyz/recs@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index 709a9aeb2ed..8961f151638 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.5", + "version": "2.0.0-next.6", "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 c5fddbca421..83db56cd973 100644 --- a/packages/store/CHANGELOG.md +++ b/packages/store/CHANGELOG.md @@ -1,5 +1,56 @@ # Change Log +## 2.0.0-next.6 + +### Minor Changes + +- [#1403](https://github.com/latticexyz/mud/pull/1403) [`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295) Thanks [@holic](https://github.com/holic)! - Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + + If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + + ```diff + -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", + +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", + -"build:abi": "forge clean && forge build", + +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", + +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", + -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", + ``` + + And update your client's `setupNetwork.ts` with: + + ```diff + -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; + +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, + - abi: IWorld__factory.abi, + + abi: IWorldAbi, + ``` + + If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + + ```ts + import { getContract } from "viem"; + import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + + const storeContract = getContract({ + abi: IStoreAbi, + ... + }); + + await storeContract.write.setRecord(...); + ``` + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/config@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Patch Changes diff --git a/packages/store/package.json b/packages/store/package.json index 7b21b96e94a..ac41284cd53 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "Store", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 084fe5d32f8..46dfcd67f9d 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.6 + ## 2.0.0-next.5 ## 2.0.0-next.4 diff --git a/packages/utils/package.json b/packages/utils/package.json index 48b882ceb39..ccfe41f1a02 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/utils", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md index 8cd0e316a60..29e4e13e109 100644 --- a/packages/world/CHANGELOG.md +++ b/packages/world/CHANGELOG.md @@ -1,5 +1,57 @@ # Change Log +## 2.0.0-next.6 + +### Minor Changes + +- [#1403](https://github.com/latticexyz/mud/pull/1403) [`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295) Thanks [@holic](https://github.com/holic)! - Added a new `@latticexyz/abi-ts` package to generate TS type declaration files (`.d.ts`) for each ABI JSON file. This replaces our usage TypeChain everywhere. It's also bundled into `@latticexyz/cli` under the `mud abi-ts` command. + + If you have a MUD project created from an older template, you can replace TypeChain with `abi-ts` by first updating your contracts' `package.json`: + + ```diff + -"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:typechain", + +"build": "pnpm run build:mud && pnpm run build:abi && pnpm run build:abi-ts", + -"build:abi": "forge clean && forge build", + +"build:abi": "rimraf abi && forge build --extra-output-files abi --out abi --skip test script MudTest.sol", + +"build:abi-ts": "mud abi-ts --input 'abi/IWorld.sol/IWorld.abi.json' && prettier --write '**/*.abi.json.d.ts'", + "build:mud": "mud tablegen && mud worldgen", + -"build:typechain": "rimraf types && typechain --target=ethers-v5 out/IWorld.sol/IWorld.json", + ``` + + And update your client's `setupNetwork.ts` with: + + ```diff + -import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory"; + +import IWorldAbi from "contracts/abi/IWorld.sol/IWorld.abi.json"; + + const worldContract = createContract({ + address: networkConfig.worldAddress as Hex, + - abi: IWorld__factory.abi, + + abi: IWorldAbi, + ``` + + If you previously relied on TypeChain types from `@latticexyz/store` or `@latticexyz/world`, you will either need to migrate to viem or abitype using ABI JSON imports or generate TypeChain types from our exported ABI JSON files. + + ```ts + import { getContract } from "viem"; + import IStoreAbi from "@latticexyz/store/abi/IStore.sol/IStore.abi.json"; + + const storeContract = getContract({ + abi: IStoreAbi, + ... + }); + + await storeContract.write.setRecord(...); + ``` + +### Patch Changes + +- Updated dependencies [[`55377ffe`](https://github.com/latticexyz/mud/commit/55377ffe6bfab13e0e834fadc07df4ef75122295)]: + - @latticexyz/store@2.0.0-next.6 + - @latticexyz/common@2.0.0-next.6 + - @latticexyz/config@2.0.0-next.6 + - @latticexyz/schema-type@2.0.0-next.6 + ## 2.0.0-next.5 ### Major Changes diff --git a/packages/world/package.json b/packages/world/package.json index 0181ae3278b..7c32c0dfa6e 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world", - "version": "2.0.0-next.5", + "version": "2.0.0-next.6", "description": "World framework", "repository": { "type": "git",