Skip to content

Commit

Permalink
wip: codegen struct names
Browse files Browse the repository at this point in the history
  • Loading branch information
yonadaaa committed May 21, 2024
1 parent d3b44ad commit f2b425e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/world/ts/node/render-solidity/interfacegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export async function interfacegen(systems: readonly DeployedSystem[]) {
const name = match[1];
const argsString = match[2];

const parameters = argsString.split(",").filter((arg) => arg.trim().length > 0);
const parameters = argsString
.split(",")
.filter((arg) => arg.trim().length > 0)
.map((parameter, i) => (parameter[0] === "(" ? `${name}${i}Struct` : parameter));

return {
name,
Expand Down

0 comments on commit f2b425e

Please sign in to comment.