From f2b425e90cb3c1b722825774e455e40c754c2b04 Mon Sep 17 00:00:00 2001 From: Fraser Scott Date: Tue, 21 May 2024 17:48:13 +0100 Subject: [PATCH] wip: codegen struct names --- packages/world/ts/node/render-solidity/interfacegen.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/world/ts/node/render-solidity/interfacegen.ts b/packages/world/ts/node/render-solidity/interfacegen.ts index 23d9af6442..77a0b4708d 100644 --- a/packages/world/ts/node/render-solidity/interfacegen.ts +++ b/packages/world/ts/node/render-solidity/interfacegen.ts @@ -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,