-
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.
Merge branch 'main' into holic/codegen-index
- Loading branch information
Showing
25 changed files
with
358 additions
and
630 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,42 @@ | ||
--- | ||
"@latticexyz/store": major | ||
"@latticexyz/world": major | ||
--- | ||
|
||
Moved the registration of store hooks and systems hooks to bitmaps with bitwise operator instead of a struct. | ||
|
||
```diff | ||
- import { StoreHookLib } from "@latticexyz/src/StoreHook.sol"; | ||
+ import { | ||
+ BEFORE_SET_RECORD, | ||
+ BEFORE_SET_FIELD, | ||
+ BEFORE_DELETE_RECORD | ||
+ } from "@latticexyz/store/storeHookTypes.sol"; | ||
|
||
StoreCore.registerStoreHook( | ||
tableId, | ||
subscriber, | ||
- StoreHookLib.encodeBitmap({ | ||
- onBeforeSetRecord: true, | ||
- onAfterSetRecord: false, | ||
- onBeforeSetField: true, | ||
- onAfterSetField: false, | ||
- onBeforeDeleteRecord: true, | ||
- onAfterDeleteRecord: false | ||
- }) | ||
+ BEFORE_SET_RECORD | BEFORE_SET_FIELD | BEFORE_DELETE_RECORD | ||
); | ||
``` | ||
|
||
```diff | ||
- import { SystemHookLib } from "../src/SystemHook.sol"; | ||
+ import { BEFORE_CALL_SYSTEM, AFTER_CALL_SYSTEM } from "../src/systemHookTypes.sol"; | ||
|
||
world.registerSystemHook( | ||
systemId, | ||
subscriber, | ||
- SystemHookLib.encodeBitmap({ onBeforeCallSystem: true, onAfterCallSystem: true }) | ||
+ BEFORE_CALL_SYSTEM | AFTER_CALL_SYSTEM | ||
); | ||
|
||
``` |
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,25 @@ | ||
--- | ||
"@latticexyz/store-indexer": minor | ||
--- | ||
|
||
You can now install and run `@latticexyz/store-indexer` from the npm package itself, without having to clone/build the MUD repo: | ||
|
||
```sh | ||
npm install @latticexyz/store-indexer | ||
|
||
npm sqlite-indexer | ||
# or | ||
npm postgres-indexer | ||
``` | ||
|
||
or | ||
|
||
```sh | ||
npx -p @latticexyz/store-indexer sqlite-indexer | ||
# or | ||
npx -p @latticexyz/store-indexer postgres-indexer | ||
``` | ||
|
||
The binary will also load the nearby `.env` file for easier local configuration. | ||
|
||
We've removed the `CHAIN_ID` requirement and instead require just a `RPC_HTTP_URL` or `RPC_WS_URL` or both. You can now also adjust the polling interval with `POLLING_INTERVAL` (defaults to 1000ms, which corresponds to MUD's default block time). |
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
Oops, something went wrong.