Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(store,world): move store tables to store namespace, world tables to world namespace #1601

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/small-pots-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@latticexyz/store-sync": patch
"@latticexyz/store": major
"@latticexyz/world-modules": patch
"@latticexyz/world": major
---

Moved `store` tables to the `"store"` namespace (previously "mudstore") and `world` tables to the `"world"` namespace (previously root namespace).
8 changes: 4 additions & 4 deletions packages/store-sync/src/postgres/postgresStorage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("postgresStorage", async () => {
{
"chainId": 31337,
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"schemaVersion": 1,
},
]
Expand All @@ -74,7 +74,7 @@ describe("postgresStorage", async () => {
"key": "0x5FbDB2315678afecb367f032d93F642f64180aa3::NumberList",
"keySchema": {},
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"name": "NumberList",
"namespace": "",
"schemaVersion": 1,
Expand All @@ -94,7 +94,7 @@ describe("postgresStorage", async () => {
"key": "0x5FbDB2315678afecb367f032d93F642f64180aa3::NumberList",
"keySchema": {},
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"name": "NumberList",
"namespace": "",
"schemaVersion": 1,
Expand All @@ -114,7 +114,7 @@ describe("postgresStorage", async () => {
"__encodedLengths": "0x0000000000000000000000000000000000000000000000000800000000000008",
"__isDeleted": false,
"__key": "0x",
"__lastUpdatedBlockNumber": 6n,
"__lastUpdatedBlockNumber": 5n,
"__staticData": null,
"value": [
420,
Expand Down
8 changes: 4 additions & 4 deletions packages/store-sync/src/sqlite/sqliteStorage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("sqliteStorage", async () => {
{
"chainId": 31337,
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"schemaVersion": 1,
},
]
Expand All @@ -77,7 +77,7 @@ describe("sqliteStorage", async () => {
"id": "0x5FbDB2315678afecb367f032d93F642f64180aa3____NumberList",
"keySchema": {},
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"name": "NumberList",
"namespace": "",
"schemaVersion": 1,
Expand All @@ -97,7 +97,7 @@ describe("sqliteStorage", async () => {
"id": "0x5FbDB2315678afecb367f032d93F642f64180aa3____NumberList",
"keySchema": {},
"lastError": null,
"lastUpdatedBlockNumber": 6n,
"lastUpdatedBlockNumber": 5n,
"name": "NumberList",
"namespace": "",
"schemaVersion": 1,
Expand All @@ -117,7 +117,7 @@ describe("sqliteStorage", async () => {
"__encodedLengths": "0x0000000000000000000000000000000000000000000000000800000000000008",
"__isDeleted": false,
"__key": "0x",
"__lastUpdatedBlockNumber": 6n,
"__lastUpdatedBlockNumber": 5n,
"__staticData": null,
"value": [
420,
Expand Down
2 changes: 1 addition & 1 deletion packages/store/mud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mudConfig } from "./ts/register";

export default mudConfig({
storeImportPath: "../../",
namespace: "mudstore",
namespace: "store",
userTypes: {
ResourceId: { filePath: "./src/ResourceId.sol", internalType: "bytes32" },
FieldLayout: { filePath: "./src/FieldLayout.sol", internalType: "bytes32" },
Expand Down
2 changes: 1 addition & 1 deletion packages/store/src/codegen/tables/ResourceIds.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/src/codegen/tables/StoreHooks.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/src/codegen/tables/Tables.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/test/codegen/tables/Callbacks.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/test/codegen/tables/KeyEncoding.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/test/codegen/tables/Mixed.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/test/codegen/tables/Vector2.sol

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/store/ts/scripts/generate-test-tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mudConfig } from "../register";

const config = mudConfig({
storeImportPath: "../../../src/",
namespace: "mudstore",
namespace: "store",
codegenDirectory: "../test/codegen",
enums: {
ExampleEnum: ["None", "First", "Second", "Third"],
Expand Down
42 changes: 21 additions & 21 deletions packages/world-modules/gas-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,67 @@
"file": "test/KeysInTableModule.t.sol",
"test": "testInstallComposite",
"name": "install keys in table module",
"gasUsed": 1407532
"gasUsed": 1407523
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testInstallGas",
"name": "install keys in table module",
"gasUsed": 1407532
"gasUsed": 1407523
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testInstallGas",
"name": "set a record on a table with keysInTableModule installed",
"gasUsed": 158799
"gasUsed": 158814
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testInstallSingleton",
"name": "install keys in table module",
"gasUsed": 1407532
"gasUsed": 1407523
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookCompositeGas",
"name": "install keys in table module",
"gasUsed": 1407532
"gasUsed": 1407523
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookCompositeGas",
"name": "change a composite record on a table with keysInTableModule installed",
"gasUsed": 22494
"gasUsed": 22497
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookCompositeGas",
"name": "delete a composite record on a table with keysInTableModule installed",
"gasUsed": 155678
"gasUsed": 155729
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookGas",
"name": "install keys in table module",
"gasUsed": 1407532
"gasUsed": 1407523
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookGas",
"name": "change a record on a table with keysInTableModule installed",
"gasUsed": 21216
"gasUsed": 21219
},
{
"file": "test/KeysInTableModule.t.sol",
"test": "testSetAndDeleteRecordHookGas",
"name": "delete a record on a table with keysInTableModule installed",
"gasUsed": 84944
"gasUsed": 84971
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testGetKeysWithValueGas",
"name": "install keys with value module",
"gasUsed": 648845
"gasUsed": 648854
},
{
"file": "test/KeysWithValueModule.t.sol",
Expand All @@ -81,49 +81,49 @@
"file": "test/KeysWithValueModule.t.sol",
"test": "testInstall",
"name": "install keys with value module",
"gasUsed": 648845
"gasUsed": 648854
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testInstall",
"name": "set a record on a table with KeysWithValueModule installed",
"gasUsed": 135390
"gasUsed": 135405
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetAndDeleteRecordHook",
"name": "install keys with value module",
"gasUsed": 648845
"gasUsed": 648854
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetAndDeleteRecordHook",
"name": "change a record on a table with KeysWithValueModule installed",
"gasUsed": 103774
"gasUsed": 103789
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetAndDeleteRecordHook",
"name": "delete a record on a table with KeysWithValueModule installed",
"gasUsed": 36462
"gasUsed": 36471
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetField",
"name": "install keys with value module",
"gasUsed": 648845
"gasUsed": 648854
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetField",
"name": "set a field on a table with KeysWithValueModule installed",
"gasUsed": 146599
"gasUsed": 146626
},
{
"file": "test/KeysWithValueModule.t.sol",
"test": "testSetField",
"name": "change a field on a table with KeysWithValueModule installed",
"gasUsed": 111358
"gasUsed": 111385
},
{
"file": "test/query.t.sol",
Expand Down Expand Up @@ -219,7 +219,7 @@
"file": "test/UniqueEntityModule.t.sol",
"test": "testInstall",
"name": "install unique entity module",
"gasUsed": 675076
"gasUsed": 675100
},
{
"file": "test/UniqueEntityModule.t.sol",
Expand All @@ -231,7 +231,7 @@
"file": "test/UniqueEntityModule.t.sol",
"test": "testInstallRoot",
"name": "installRoot unique entity module",
"gasUsed": 642427
"gasUsed": 642496
},
{
"file": "test/UniqueEntityModule.t.sol",
Expand Down
Loading