-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli,recs,std-client): update RECS components with v2 key/value s…
…chemas (#1195)
- Loading branch information
Showing
24 changed files
with
326 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
"@latticexyz/cli": patch | ||
"@latticexyz/recs": patch | ||
"@latticexyz/std-client": patch | ||
--- | ||
|
||
Update RECS components with v2 key/value schemas. This helps with encoding/decoding composite keys and strong types for keys/values. | ||
|
||
This may break if you were previously dependent on `component.id`, `component.metadata.componentId`, or `component.metadata.tableId`: | ||
|
||
- `component.id` is now the on-chain `bytes32` hex representation of the table ID | ||
- `component.metadata.componentName` is the table name (e.g. `Position`) | ||
- `component.metadata.tableName` is the namespaced table name (e.g. `myworld:Position`) | ||
- `component.metadata.keySchema` is an object with key names and their corresponding ABI types | ||
- `component.metadata.valueSchema` is an object with field names and their corresponding ABI types |
41 changes: 24 additions & 17 deletions
41
e2e/packages/client-vanilla/src/mud/contractComponents.ts
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
35 changes: 22 additions & 13 deletions
35
examples/minimal/packages/client-phaser/src/mud/contractComponents.ts
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
35 changes: 22 additions & 13 deletions
35
examples/minimal/packages/client-react/src/mud/contractComponents.ts
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
35 changes: 22 additions & 13 deletions
35
examples/minimal/packages/client-vanilla/src/mud/contractComponents.ts
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
Oops, something went wrong.