@latticexyz/cli 2.0.0-main-76055f45 → 2.0.0-main-e0377761

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.
Files changed (38) hide show
  1. package/dist/chunk-KX5JLFDL.js +11 -0
  2. package/dist/chunk-KX5JLFDL.js.map +1 -0
  3. package/dist/index.js +1 -1
  4. package/dist/mud.js +6 -6
  5. package/dist/mud.js.map +1 -1
  6. package/package.json +11 -11
  7. package/src/commands/deploy.ts +1 -1
  8. package/src/commands/dev-contracts.ts +1 -3
  9. package/src/commands/test.ts +1 -1
  10. package/src/commands/trace.ts +1 -2
  11. package/src/commands/worldgen.ts +1 -1
  12. package/src/utils/deploy.ts +555 -183
  13. package/src/utils/deployHandler.ts +1 -1
  14. package/src/utils/index.ts +6 -0
  15. package/dist/chunk-3LOTLAJX.js +0 -11
  16. package/dist/chunk-3LOTLAJX.js.map +0 -1
  17. package/src/utils/modules/constants.ts +0 -23
  18. package/src/utils/modules/getInstallModuleCallData.ts +0 -27
  19. package/src/utils/modules/getUserModules.ts +0 -5
  20. package/src/utils/modules/types.ts +0 -14
  21. package/src/utils/systems/getGrantAccessCallData.ts +0 -29
  22. package/src/utils/systems/getRegisterFunctionSelectorsCallData.ts +0 -68
  23. package/src/utils/systems/getRegisterSystemCallData.ts +0 -17
  24. package/src/utils/systems/types.ts +0 -14
  25. package/src/utils/systems/utils.ts +0 -50
  26. package/src/utils/tables/getRegisterTableCallData.ts +0 -40
  27. package/src/utils/tables/getTableIds.ts +0 -21
  28. package/src/utils/tables/types.ts +0 -12
  29. package/src/utils/utils/confirmNonce.ts +0 -24
  30. package/src/utils/utils/deployContract.ts +0 -33
  31. package/src/utils/utils/fastTxExecute.ts +0 -56
  32. package/src/utils/utils/getContractData.ts +0 -29
  33. package/src/utils/utils/postDeploy.ts +0 -25
  34. package/src/utils/utils/setInternalFeePerGas.ts +0 -49
  35. package/src/utils/utils/toBytes16.ts +0 -16
  36. package/src/utils/utils/types.ts +0 -21
  37. package/src/utils/world.ts +0 -28
  38. /package/src/utils/{utils/getChainId.ts → getChainId.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/cli",
3
- "version": "2.0.0-main-76055f45",
3
+ "version": "2.0.0-main-e0377761",
4
4
  "description": "Command line interface for mud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,16 +36,16 @@
36
36
  "yargs": "^17.7.1",
37
37
  "zod": "^3.21.4",
38
38
  "zod-validation-error": "^1.3.0",
39
- "@latticexyz/abi-ts": "2.0.0-main-76055f45",
40
- "@latticexyz/common": "2.0.0-main-76055f45",
41
- "@latticexyz/config": "2.0.0-main-76055f45",
42
- "@latticexyz/gas-report": "2.0.0-main-76055f45",
43
- "@latticexyz/protocol-parser": "2.0.0-main-76055f45",
44
- "@latticexyz/schema-type": "2.0.0-main-76055f45",
45
- "@latticexyz/services": "2.0.0-main-76055f45",
46
- "@latticexyz/store": "2.0.0-main-76055f45",
47
- "@latticexyz/utils": "2.0.0-main-76055f45",
48
- "@latticexyz/world": "2.0.0-main-76055f45"
39
+ "@latticexyz/abi-ts": "2.0.0-main-e0377761",
40
+ "@latticexyz/common": "2.0.0-main-e0377761",
41
+ "@latticexyz/config": "2.0.0-main-e0377761",
42
+ "@latticexyz/gas-report": "2.0.0-main-e0377761",
43
+ "@latticexyz/protocol-parser": "2.0.0-main-e0377761",
44
+ "@latticexyz/schema-type": "2.0.0-main-e0377761",
45
+ "@latticexyz/services": "2.0.0-main-e0377761",
46
+ "@latticexyz/store": "2.0.0-main-e0377761",
47
+ "@latticexyz/utils": "2.0.0-main-e0377761",
48
+ "@latticexyz/world": "2.0.0-main-e0377761"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/ejs": "^3.1.1",
@@ -1,6 +1,6 @@
1
1
  import type { CommandModule, Options } from "yargs";
2
2
  import { logError } from "../utils/errors";
3
- import { DeployOptions, deployHandler } from "../utils/deployHandler";
3
+ import { deployHandler, DeployOptions } from "../utils";
4
4
 
5
5
  export const yDeployOptions = {
6
6
  configPath: { type: "string", desc: "Path to the config file" },
@@ -9,12 +9,10 @@ import path from "path";
9
9
  import { debounce } from "throttle-debounce";
10
10
  import { worldgenHandler } from "./worldgen";
11
11
  import { WorldConfig } from "@latticexyz/world";
12
+ import { deployHandler, logError, printMUD } from "../utils";
12
13
  import { homedir } from "os";
13
14
  import { rmSync } from "fs";
14
15
  import { execa } from "execa";
15
- import { logError } from "../utils/errors";
16
- import { deployHandler } from "../utils/deployHandler";
17
- import { printMUD } from "../utils/printMUD";
18
16
 
19
17
  type Options = {
20
18
  rpc?: string;
@@ -3,7 +3,7 @@ import { anvil, forge, getRpcUrl } from "@latticexyz/common/foundry";
3
3
  import chalk from "chalk";
4
4
  import { rmSync, writeFileSync } from "fs";
5
5
  import { yDeployOptions } from "./deploy";
6
- import { DeployOptions, deployHandler } from "../utils/deployHandler";
6
+ import { deployHandler, DeployOptions } from "../utils";
7
7
 
8
8
  type Options = DeployOptions & { port?: number; worldAddress?: string; forgeOptions?: string };
9
9
 
@@ -10,8 +10,7 @@ import { resolveWorldConfig, WorldConfig } from "@latticexyz/world";
10
10
  import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" assert { type: "json" };
11
11
  import worldConfig from "@latticexyz/world/mud.config.js";
12
12
  import { tableIdToHex } from "@latticexyz/common";
13
- import { getExistingContracts } from "../utils/getExistingContracts";
14
- import { getChainId } from "../utils/utils/getChainId";
13
+ import { getChainId, getExistingContracts } from "../utils";
15
14
 
16
15
  // TODO account for multiple namespaces (https://github.com/latticexyz/mud/issues/994)
17
16
  const systemsTableId = tableIdToHex(worldConfig.namespace, worldConfig.tables.Systems.name);
@@ -6,7 +6,7 @@ import { worldgen } from "@latticexyz/world/node";
6
6
  import { getSrcDirectory } from "@latticexyz/common/foundry";
7
7
  import path from "path";
8
8
  import { rmSync } from "fs";
9
- import { getExistingContracts } from "../utils/getExistingContracts";
9
+ import { getExistingContracts } from "../utils";
10
10
 
11
11
  type Options = {
12
12
  configPath?: string;