Skip to content

Commit

Permalink
Version Packages (next)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 7, 2023
1 parent 9af542d commit a05747c
Show file tree
Hide file tree
Showing 58 changed files with 463 additions and 35 deletions.
5 changes: 4 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -99,6 +101,7 @@
"strong-geckos-shake",
"tame-lemons-play",
"thin-buses-reply",
"tricky-carrots-talk",
"tricky-frogs-beam",
"tricky-kangaroos-love",
"tricky-olives-stare",
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# Version 2.0.0-next.6

## Major changes

**[style(gas-report): rename mud-gas-report to gas-report (#1410)](https://github.com/latticexyz/mud/commit/9af542d3e29e2699144534dec3430e19294077d4)** (@latticexyz/gas-report)

Renames `mud-gas-report` binary to `gas-report`, since it's no longer MUD specific.

## 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
Expand Down
45 changes: 45 additions & 0 deletions packages/abi-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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(...);
```
2 changes: 1 addition & 1 deletion packages/abi-ts/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 9 additions & 0 deletions packages/block-logs-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @latticexyz/block-logs-stream

## 2.0.0-next.6

### Patch Changes

- Updated dependencies []:
- @latticexyz/schema-type@2.0.0-next.6
- @latticexyz/common@2.0.0-next.6
- @latticexyz/config@2.0.0-next.6

## 2.0.0-next.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/block-logs-stream/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
58 changes: 58 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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), [`9af542d3`](https://github.com/latticexyz/mud/commit/9af542d3e29e2699144534dec3430e19294077d4)]:
- @latticexyz/abi-ts@2.0.0-next.6
- @latticexyz/store@2.0.0-next.6
- @latticexyz/world@2.0.0-next.6
- @latticexyz/gas-report@2.0.0-next.6
- @latticexyz/schema-type@2.0.0-next.6
- @latticexyz/common@2.0.0-next.6
- @latticexyz/config@2.0.0-next.6
- @latticexyz/protocol-parser@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
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 7 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 8 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 2.0.0-next.6

### Patch Changes

- Updated dependencies []:
- @latticexyz/schema-type@2.0.0-next.6
- @latticexyz/common@2.0.0-next.6

## 2.0.0-next.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
44 changes: 44 additions & 0 deletions packages/create-mud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/create-mud/package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
Expand Down
13 changes: 13 additions & 0 deletions packages/dev-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 7 additions & 7 deletions packages/dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions packages/ecs-browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @latticexyz/ecs-browser

## 2.0.0-next.6

## 2.0.0-next.5

## 2.0.0-next.4
Expand Down
2 changes: 1 addition & 1 deletion packages/ecs-browser/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@latticexyz/ecs-browser",
"version": "2.0.0-next.5",
"version": "2.0.0-next.6",
"private": true
}
Loading

0 comments on commit a05747c

Please sign in to comment.