@latticexyz/cli 2.0.0-alpha.63 → 2.0.0-alpha.65

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/mud.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  commands
4
- } from "./chunk-34G7YV6W.js";
5
- import "./chunk-CYLVBDRW.js";
4
+ } from "./chunk-CWMHAFSV.js";
5
+ import "./chunk-VQQZJE3V.js";
6
6
  import {
7
7
  logError
8
8
  } from "./chunk-S7JI7355.js";
package/dist/mud2.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  commands
4
- } from "./chunk-34G7YV6W.js";
5
- import "./chunk-CYLVBDRW.js";
4
+ } from "./chunk-CWMHAFSV.js";
5
+ import "./chunk-VQQZJE3V.js";
6
6
  import {
7
7
  logError
8
8
  } from "./chunk-S7JI7355.js";
@@ -87,6 +87,7 @@ interface RenderSystemInterfaceOptions {
87
87
  interface RenderSystemInterfaceFunction {
88
88
  name: string;
89
89
  parameters: string[];
90
+ stateMutability: string;
90
91
  returnParameters: string[];
91
92
  }
92
93
  interface RenderWorldOptions {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  deploy
3
- } from "../chunk-CYLVBDRW.js";
3
+ } from "../chunk-VQQZJE3V.js";
4
4
  import {
5
5
  MUDError,
6
6
  NotInsideProjectError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@latticexyz/cli",
3
- "version": "2.0.0-alpha.63+b63aca8a",
3
+ "version": "2.0.0-alpha.65+cbef50d0",
4
4
  "description": "Command line interface for mud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "release": "npm publish --access=public"
29
29
  },
30
30
  "devDependencies": {
31
- "@latticexyz/store": "^2.0.0-alpha.63+b63aca8a",
31
+ "@latticexyz/store": "^2.0.0-alpha.65+cbef50d0",
32
32
  "@types/ejs": "^3.1.1",
33
33
  "@types/glob": "^7.2.0",
34
34
  "@types/node": "^17.0.34",
@@ -41,10 +41,10 @@
41
41
  "dependencies": {
42
42
  "@improbable-eng/grpc-web": "^0.15.0",
43
43
  "@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
44
- "@latticexyz/schema-type": "^2.0.0-alpha.63+b63aca8a",
45
- "@latticexyz/services": "^2.0.0-alpha.63+b63aca8a",
46
- "@latticexyz/solecs": "^2.0.0-alpha.63+b63aca8a",
47
- "@latticexyz/std-contracts": "^2.0.0-alpha.63+b63aca8a",
44
+ "@latticexyz/schema-type": "^2.0.0-alpha.65+cbef50d0",
45
+ "@latticexyz/services": "^2.0.0-alpha.65+cbef50d0",
46
+ "@latticexyz/solecs": "^2.0.0-alpha.65+cbef50d0",
47
+ "@latticexyz/std-contracts": "^2.0.0-alpha.65+cbef50d0",
48
48
  "@solidity-parser/parser": "^0.16.0",
49
49
  "@typechain/ethers-v5": "^10.1.1",
50
50
  "chalk": "^5.0.1",
@@ -72,5 +72,5 @@
72
72
  "zod": "^3.21.4",
73
73
  "zod-validation-error": "^1.0.1"
74
74
  },
75
- "gitHead": "b63aca8a6705b3507ccbb1606734c0a0058522a5"
75
+ "gitHead": "cbef50d07e65802dc49baeb26065d9a61ae59228"
76
76
  }
@@ -11,10 +11,10 @@ ${renderImports(imports)}
11
11
  interface ${name} {
12
12
  ${renderList(
13
13
  functions,
14
- ({ name, parameters, returnParameters }) => `
15
- function ${functionPrefix}${name}(${renderArguments(parameters)}) external ${renderReturnParameters(
16
- returnParameters
17
- )};
14
+ ({ name, parameters, stateMutability, returnParameters }) => `
15
+ function ${functionPrefix}${name}(
16
+ ${renderArguments(parameters)}
17
+ ) external ${stateMutability} ${renderReturnParameters(returnParameters)};
18
18
  `
19
19
  )}
20
20
  }
@@ -95,6 +95,7 @@ export interface RenderSystemInterfaceOptions {
95
95
  export interface RenderSystemInterfaceFunction {
96
96
  name: string;
97
97
  parameters: string[];
98
+ stateMutability: string;
98
99
  returnParameters: string[];
99
100
  }
100
101
 
@@ -24,7 +24,7 @@ export function contractToInterface(data: string, contractName: string) {
24
24
  }
25
25
  },
26
26
  FunctionDefinition(
27
- { name, visibility, parameters, returnParameters, isConstructor, isFallback, isReceiveEther },
27
+ { name, visibility, parameters, stateMutability, returnParameters, isConstructor, isFallback, isReceiveEther },
28
28
  parent
29
29
  ) {
30
30
  if (parent !== undefined && parent.type === "ContractDefinition" && parent.name === contractName) {
@@ -38,6 +38,7 @@ export function contractToInterface(data: string, contractName: string) {
38
38
  functions.push({
39
39
  name: name === null ? "" : name,
40
40
  parameters: parameters.map(parseParameter),
41
+ stateMutability: stateMutability || "",
41
42
  returnParameters: returnParameters === null ? [] : returnParameters.map(parseParameter),
42
43
  });
43
44