diff --git a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/FunctionField.tsx b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/FunctionField.tsx index 0af31cddd0..0556bcad6d 100644 --- a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/FunctionField.tsx +++ b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/FunctionField.tsx @@ -56,12 +56,14 @@ export function FunctionField({ worldAbi, functionAbi }: Props) { const [txHash, setTxHash] = useState(); const txUrl = blockExplorerTransactionUrl({ hash: txHash, chainId }); - // Tuples are mapped to e.g. "[int16, int16, int16]" to inform the user what to input - const inputLabels = functionAbi.inputs.map((input) => - input.type === "tuple" && "components" in input - ? `[${input.components.map((c) => c.type).join(", ")}]` - : input.type, - ); + const inputLabels = functionAbi.inputs.map((input) => { + if (input.type === "tuple" && "components" in input) { + return `[${input.components.map((c) => c.type).join(", ")}]`; + } else if (input.type === "tuple[]" && "components" in input) { + return `[${input.components.map((c) => c.type).join(", ")}][]`; + } + return input.type; + }); const form = useForm>({ resolver: zodResolver(formSchema),