-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e0200f
commit cecbdd6
Showing
59 changed files
with
474 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# @latticexyz/abi-ts | ||
|
||
## 2.0.0-next.9 | ||
|
||
## 2.0.0-next.8 | ||
|
||
## 2.0.0-next.7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,65 @@ | ||
# Change Log | ||
|
||
## 2.0.0-next.9 | ||
|
||
### Major Changes | ||
|
||
- [#1336](https://github.com/latticexyz/mud/pull/1336) [`de151fec`](https://github.com/latticexyz/mud/commit/de151fec07b63a6022483c1ad133c556dd44992e) Thanks [@dk1a](https://github.com/dk1a)! - - Add `FieldLayout`, which is a `bytes32` user-type similar to `Schema`. | ||
|
||
Both `FieldLayout` and `Schema` have the same kind of data in the first 4 bytes. | ||
|
||
- 2 bytes for total length of all static fields | ||
- 1 byte for number of static size fields | ||
- 1 byte for number of dynamic size fields | ||
|
||
But whereas `Schema` has `SchemaType` enum in each of the other 28 bytes, `FieldLayout` has static byte lengths in each of the other 28 bytes. | ||
|
||
- Replace `Schema valueSchema` with `FieldLayout fieldLayout` in Store and World contracts. | ||
|
||
`FieldLayout` is more gas-efficient because it already has lengths, and `Schema` has types which need to be converted to lengths. | ||
|
||
- Add `getFieldLayout` to `IStore` interface. | ||
|
||
There is no `FieldLayout` for keys, only for values, because key byte lengths aren't usually relevant on-chain. You can still use `getKeySchema` if you need key types. | ||
|
||
- Add `fieldLayoutToHex` utility to `protocol-parser` package. | ||
|
||
- Add `constants.sol` for constants shared between `FieldLayout`, `Schema` and `PackedCounter`. | ||
|
||
### Patch Changes | ||
|
||
- [#1472](https://github.com/latticexyz/mud/pull/1472) [`c049c23f`](https://github.com/latticexyz/mud/commit/c049c23f48b93ac7881fb1a5a8417831611d5cbf) Thanks [@alvrs](https://github.com/alvrs)! - - The `World` contract now has an `initialize` function, which can be called once by the creator of the World to install the core module. | ||
This change allows the registration of all core tables to happen in the `CoreModule`, so no table metadata has to be included in the `World`'s bytecode. | ||
|
||
```solidity | ||
interface IBaseWorld { | ||
function initialize(IModule coreModule) public; | ||
} | ||
``` | ||
|
||
- The `World` contract now stores the original creator of the `World` in an immutable state variable. | ||
It is used internally to only allow the original creator to initialize the `World` in a separate transaction. | ||
|
||
```solidity | ||
interface IBaseWorld { | ||
function creator() external view returns (address); | ||
} | ||
``` | ||
- The deploy script is updated to use the `World`'s `initialize` function to install the `CoreModule` instead of `registerRootModule` as before. | ||
- Updated dependencies [[`de151fec`](https://github.com/latticexyz/mud/commit/de151fec07b63a6022483c1ad133c556dd44992e), [`f1cd43bf`](https://github.com/latticexyz/mud/commit/f1cd43bf9264d5a23a3edf2a1ea4212361a72203), [`c049c23f`](https://github.com/latticexyz/mud/commit/c049c23f48b93ac7881fb1a5a8417831611d5cbf), [`c049c23f`](https://github.com/latticexyz/mud/commit/c049c23f48b93ac7881fb1a5a8417831611d5cbf)]: | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
- @latticexyz/[email protected] | ||
## 2.0.0-next.8 | ||
### Patch Changes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Change Log | ||
|
||
## 2.0.0-next.9 | ||
|
||
## 2.0.0-next.8 | ||
|
||
## 2.0.0-next.7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "create-mud", | ||
"version": "2.0.0-next.8", | ||
"version": "2.0.0-next.9", | ||
"description": "Create a new MUD project", | ||
"license": "MIT", | ||
"author": "Lattice <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# @latticexyz/ecs-browser | ||
|
||
## 2.0.0-next.9 | ||
|
||
## 2.0.0-next.8 | ||
|
||
## 2.0.0-next.7 | ||
|
Oops, something went wrong.