@latticexyz/cli 2.0.0-alpha.78 → 2.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TPZUS44H.js → chunk-6V563IAZ.js} +5 -5
- package/dist/{chunk-O6HOO6WA.js → chunk-L4YLJHLJ.js} +1 -9
- package/dist/{chunk-TLEAEDUA.js → chunk-QAJBBYA2.js} +357 -224
- package/dist/{chunk-KPBNUPK6.js → chunk-SKNB74MT.js} +155 -159
- package/dist/chunk-VQTZJIFF.js +353 -0
- package/dist/{chunk-DO7OWTMM.js → chunk-WZFXLDPK.js} +7 -9
- package/dist/{chunk-XUNWAEP7.js → chunk-YL4GJLLL.js} +5345 -6628
- package/dist/index.d.ts +2 -4
- package/dist/index.js +0 -22
- package/dist/mud.js +311 -318
- package/dist/mud2.js +7 -9
- package/dist/render-solidity/index.d.ts +2 -3
- package/dist/render-solidity/index.js +3 -4
- package/dist/render-ts/index.d.ts +2 -3
- package/dist/render-ts/index.js +3 -4
- package/dist/utils/deprecated/index.js +2 -2
- package/dist/utils/index.d.ts +3 -15
- package/dist/utils/index.js +4 -15
- package/package.json +36 -37
- package/src/commands/deploy-v2.ts +8 -4
- package/src/commands/deprecated/test.ts +1 -1
- package/src/commands/gas-report.ts +54 -55
- package/src/commands/set-version.ts +39 -10
- package/src/commands/tablegen.ts +1 -1
- package/src/commands/tsgen.ts +1 -1
- package/src/commands/worldgen.ts +1 -2
- package/src/contracts/BulkUpload.sol +13 -20
- package/src/contracts/Deploy.sol +3 -3
- package/src/contracts/LibDeploy.sol +1 -1
- package/src/contracts/LibDeployStub.sol +1 -1
- package/src/index.ts +1 -15
- package/src/render-solidity/common.ts +4 -4
- package/src/render-solidity/renderTypesFromConfig.ts +1 -1
- package/src/render-solidity/tableOptions.ts +2 -2
- package/src/render-solidity/tablegen.ts +1 -1
- package/src/render-solidity/types.ts +1 -1
- package/src/render-solidity/userType.ts +1 -2
- package/src/render-solidity/worldgen.ts +3 -3
- package/src/render-ts/recsV1TableOptions.ts +2 -2
- package/src/render-ts/renderRecsV1Tables.ts +2 -2
- package/src/render-ts/tsgen.ts +1 -1
- package/src/render-ts/types.ts +1 -1
- package/src/utils/contractToInterface.ts +1 -1
- package/src/utils/deploy-v2.ts +79 -78
- package/src/utils/errors.ts +3 -23
- package/dist/chunk-5NC2OON2.js +0 -164
- package/dist/chunk-FFY7VTYB.js +0 -14358
- package/dist/chunk-MN3HYFJK.js +0 -442
- package/dist/config/index.d.ts +0 -409
- package/dist/config/index.js +0 -85
- package/dist/parseStoreConfig-8aa69ac9.d.ts +0 -377
- package/src/config/commonSchemas.ts +0 -34
- package/src/config/dynamicResolution.ts +0 -49
- package/src/config/index.ts +0 -24
- package/src/config/loadConfig.ts +0 -40
- package/src/config/loadStoreConfig.ts +0 -18
- package/src/config/parseStoreConfig.test-d.ts +0 -40
- package/src/config/parseStoreConfig.ts +0 -317
- package/src/config/validation.ts +0 -163
- package/src/config/world/index.ts +0 -4
- package/src/config/world/loadWorldConfig.test-d.ts +0 -11
- package/src/config/world/loadWorldConfig.ts +0 -26
- package/src/config/world/parseWorldConfig.ts +0 -56
- package/src/config/world/resolveWorldConfig.ts +0 -80
- package/src/config/world/userTypes.ts +0 -74
- package/src/utils/typeUtils.ts +0 -17
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
+
SchemaTypeArrayToElement,
|
|
2
3
|
formatAndWriteSolidity,
|
|
3
4
|
getSchemaTypeInfo,
|
|
4
5
|
importForAbiOrUserType,
|
|
5
6
|
resolveAbiOrUserType
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
SchemaTypeArrayToElement
|
|
9
|
-
} from "./chunk-KPBNUPK6.js";
|
|
7
|
+
} from "./chunk-SKNB74MT.js";
|
|
10
8
|
|
|
11
9
|
// src/render-solidity/tableOptions.ts
|
|
12
10
|
import path from "path";
|
|
@@ -58,7 +56,7 @@ function getTableOptions(config) {
|
|
|
58
56
|
return {
|
|
59
57
|
tableIdName: tableName + "TableId",
|
|
60
58
|
namespace: config.namespace,
|
|
61
|
-
|
|
59
|
+
name: tableData.name
|
|
62
60
|
};
|
|
63
61
|
}
|
|
64
62
|
})();
|
|
@@ -101,7 +99,7 @@ function renderCommonData({
|
|
|
101
99
|
primaryKeys
|
|
102
100
|
}) {
|
|
103
101
|
const _tableId = staticResourceData ? "" : "_tableId";
|
|
104
|
-
const _typedTableId = staticResourceData ? "" : "
|
|
102
|
+
const _typedTableId = staticResourceData ? "" : "bytes32 _tableId";
|
|
105
103
|
const _keyArgs = renderArguments(primaryKeys.map(({ name }) => name));
|
|
106
104
|
const _typedKeyArgs = renderArguments(primaryKeys.map(({ name, typeWithLocation }) => `${typeWithLocation} ${name}`));
|
|
107
105
|
const _primaryKeysDefinition = `
|
|
@@ -147,10 +145,10 @@ function renderWithStore(storeArgument, callback) {
|
|
|
147
145
|
return result;
|
|
148
146
|
}
|
|
149
147
|
function renderTableId(staticResourceData) {
|
|
150
|
-
const hardcodedTableId = `
|
|
148
|
+
const hardcodedTableId = `bytes32(abi.encodePacked(bytes16("${staticResourceData.namespace}"), bytes16("${staticResourceData.name}")))`;
|
|
151
149
|
const tableIdDefinition = `
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
bytes32 constant _tableId = ${hardcodedTableId};
|
|
151
|
+
bytes32 constant ${staticResourceData.tableIdName} = _tableId;
|
|
154
152
|
`;
|
|
155
153
|
return {
|
|
156
154
|
hardcodedTableId,
|