diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 0000000000..b955917e81 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,36 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "@latticexyz/block-logs-stream": "1.42.0", + "@latticexyz/cli": "1.42.0", + "@latticexyz/common": "1.42.0", + "@latticexyz/config": "1.42.0", + "create-mud": "1.42.0", + "@latticexyz/dev-tools": "1.42.0", + "@latticexyz/ecs-browser": "1.42.0", + "@latticexyz/network": "1.42.0", + "@latticexyz/noise": "1.42.0", + "@latticexyz/phaserx": "1.42.0", + "@latticexyz/protocol-parser": "1.42.0", + "@latticexyz/react": "1.42.0", + "@latticexyz/recs": "1.42.0", + "@latticexyz/schema-type": "1.42.0", + "@latticexyz/services": "1.42.0", + "@latticexyz/solecs": "1.42.0", + "solhint-config-mud": "1.42.0", + "solhint-plugin-mud": "1.42.0", + "@latticexyz/std-client": "1.42.0", + "@latticexyz/std-contracts": "1.42.0", + "@latticexyz/store": "1.42.0", + "@latticexyz/store-cache": "1.42.0", + "@latticexyz/utils": "1.42.0", + "@latticexyz/world": "1.42.0" + }, + "changesets": [ + "fast-ears-hug", + "many-phones-study", + "nasty-waves-divide", + "strange-candles-shout" + ] +} diff --git a/packages/block-logs-stream/CHANGELOG.md b/packages/block-logs-stream/CHANGELOG.md new file mode 100644 index 0000000000..38af4d4a90 --- /dev/null +++ b/packages/block-logs-stream/CHANGELOG.md @@ -0,0 +1,48 @@ +# @latticexyz/block-logs-stream + +## 1.43.0-next.0 + +### Minor Changes + +- [#1070](https://github.com/latticexyz/mud/pull/1070) [`72b80697`](https://github.com/latticexyz/mud/commit/72b806979db6eb2880772193898351d657b94f75) Thanks [@holic](https://github.com/holic)! - Add block logs stream package + + ```ts + import { filter, map, mergeMap } from "rxjs"; + import { createPublicClient, parseAbi } from "viem"; + import { + createBlockStream, + isNonPendingBlock, + groupLogsByBlockNumber, + blockRangeToLogs, + } from "@latticexyz/block-logs-stream"; + + const publicClient = createPublicClient({ + // your viem public client config here + }); + + const latestBlock$ = await createBlockStream({ publicClient, blockTag: "latest" }); + + const latestBlockNumber$ = latestBlock$.pipe( + filter(isNonPendingBlock), + map((block) => block.number) + ); + + latestBlockNumber$ + .pipe( + map((latestBlockNumber) => ({ startBlock: 0n, endBlock: latestBlockNumber })), + blockRangeToLogs({ + publicClient, + address, + events: parseAbi([ + "event StoreDeleteRecord(bytes32 table, bytes32[] key)", + "event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)", + "event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)", + "event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)", + ]), + }), + mergeMap(({ logs }) => from(groupLogsByBlockNumber(logs))) + ) + .subscribe((block) => { + console.log("got events for block", block); + }); + ``` diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 15efcc768e..d2f16151a2 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": "1.42.0", + "version": "1.43.0-next.0", "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 bb9f4bded0..4a7065c268 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 1.42.1-next.0 + +### Patch Changes + +- Updated dependencies [[`086be4ef`](https://github.com/latticexyz/mud/commit/086be4ef4f3c1ecb3eac0e9554d7d4eb64531fc2)]: + - @latticexyz/services@1.42.1-next.0 + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/cli/package.json b/packages/cli/package.json index 6c94e5b3c4..cc0291d900 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "1.42.0", + "version": "1.42.1-next.0", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/dev-tools/CHANGELOG.md b/packages/dev-tools/CHANGELOG.md new file mode 100644 index 0000000000..87f1efd122 --- /dev/null +++ b/packages/dev-tools/CHANGELOG.md @@ -0,0 +1,9 @@ +# @latticexyz/dev-tools + +## 1.42.1-next.0 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/network@1.42.1-next.0 + - @latticexyz/std-client@1.42.1-next.0 diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index 66118d3733..66c10b9d66 100644 --- a/packages/dev-tools/package.json +++ b/packages/dev-tools/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/dev-tools", - "version": "1.42.0", + "version": "1.42.1-next.0", "description": "MUD developer tools", "repository": { "type": "git", @@ -49,8 +49,8 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/network": "*", - "@latticexyz/std-client": "*", + "@latticexyz/network": "1.42.1-next.0", + "@latticexyz/std-client": "1.42.1-next.0", "@latticexyz/utils": "*", "@latticexyz/world": "*" }, diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index 1acba3f06b..589690ccac 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 1.42.1-next.0 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/std-client@1.42.1-next.0 + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index c043dad6fe..e4babb7113 100644 --- a/packages/ecs-browser/package.json +++ b/packages/ecs-browser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/ecs-browser", - "version": "1.42.0", + "version": "1.42.1-next.0", "description": "Component Browser for RECS", "repository": { "type": "git", diff --git a/packages/network/CHANGELOG.md b/packages/network/CHANGELOG.md index a2ff8a55c2..9ed320e0e3 100644 --- a/packages/network/CHANGELOG.md +++ b/packages/network/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 1.42.1-next.0 + +### Patch Changes + +- Updated dependencies [[`086be4ef`](https://github.com/latticexyz/mud/commit/086be4ef4f3c1ecb3eac0e9554d7d4eb64531fc2)]: + - @latticexyz/services@1.42.1-next.0 + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/network/package.json b/packages/network/package.json index 31eaaa63ce..32ee40da96 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/network", - "version": "1.42.0", + "version": "1.42.1-next.0", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/protocol-parser/CHANGELOG.md b/packages/protocol-parser/CHANGELOG.md new file mode 100644 index 0000000000..abc705a0ed --- /dev/null +++ b/packages/protocol-parser/CHANGELOG.md @@ -0,0 +1,29 @@ +# @latticexyz/protocol-parser + +## 1.43.0-next.0 + +### Minor Changes + +- [#1100](https://github.com/latticexyz/mud/pull/1100) [`b98e5180`](https://github.com/latticexyz/mud/commit/b98e51808aaa29f922ac215cf666cf6049e692d6) Thanks [@alvrs](https://github.com/alvrs)! - feat: add abiTypesToSchema, a util to turn a list of abi types into a Schema by separating static and dynamic types + +- [#1111](https://github.com/latticexyz/mud/pull/1111) [`ca50fef8`](https://github.com/latticexyz/mud/commit/ca50fef8108422a121d03571fb4679060bd4891a) Thanks [@alvrs](https://github.com/alvrs)! - feat: add `encodeKeyTuple`, a util to encode key tuples in Typescript (equivalent to key tuple encoding in Solidity and inverse of `decodeKeyTuple`). + Example: + + ```ts + encodeKeyTuple({ staticFields: ["uint256", "int32", "bytes16", "address", "bool", "int8"], dynamicFields: [] }, [ + 42n, + -42, + "0x12340000000000000000000000000000", + "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF", + true, + 3, + ]); + // [ + // "0x000000000000000000000000000000000000000000000000000000000000002a", + // "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd6", + // "0x1234000000000000000000000000000000000000000000000000000000000000", + // "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + // "0x0000000000000000000000000000000000000000000000000000000000000001", + // "0x0000000000000000000000000000000000000000000000000000000000000003", + // ] + ``` diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index 8555bea2f2..f920e8957e 100644 --- a/packages/protocol-parser/package.json +++ b/packages/protocol-parser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/protocol-parser", - "version": "1.42.0", + "version": "1.43.0-next.0", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index a5512bace4..e458b00780 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.42.1-next.0 + +### Patch Changes + +- [#1074](https://github.com/latticexyz/mud/pull/1074) [`086be4ef`](https://github.com/latticexyz/mud/commit/086be4ef4f3c1ecb3eac0e9554d7d4eb64531fc2) Thanks [@alvrs](https://github.com/alvrs)! - fix a bug related to encoding negative bigints in MODE + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/services/package.json b/packages/services/package.json index a3efd5c824..3642ffe8dd 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "1.42.0", + "version": "1.42.1-next.0", "description": "MUD services for enhanced interactions with on-chain ECS state", "repository": { "type": "git", diff --git a/packages/std-client/CHANGELOG.md b/packages/std-client/CHANGELOG.md index 507e270996..5c092899aa 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 1.42.1-next.0 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/cli@1.42.1-next.0 + - @latticexyz/network@1.42.1-next.0 + All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/std-client/package.json b/packages/std-client/package.json index 923391cce4..f9ba3ed3b2 100644 --- a/packages/std-client/package.json +++ b/packages/std-client/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/std-client", - "version": "1.42.0", + "version": "1.42.1-next.0", "description": "Standard library for MUD client.", "repository": { "type": "git",