Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case "void":
return "void";
case "bytes":
case "dynamic-bytes":
return "string";
case "array":
return `(${generateOutputType(evmType.itemType)})[]`;
case "boolean":
return "boolean";
case "string":
return "string";
case "tuple":
return generateTupleType(evmType, generateOutputType);
default:
throw new UnreachableCaseError(evmType);
}
}
return "string | BigNumber";
case "bytes":
return "string | BigNumber";
case "dynamic-bytes":
return "string";
case "array":
return `(${generateInputType(evmType.itemType)})[]`;
case "boolean":
return "boolean";
case "string":
return "string";
case "tuple":
return generateTupleType(evmType, generateInputType);
default:
throw new UnreachableCaseError(evmType);
}
}
case "void":
return "void";
case "string":
return "string";
case "bytes":
case "dynamic-bytes":
return "string";
case "address":
return "string";
case "array":
return codeGenForOutput(evmType.itemType) + "[]";
case "tuple":
return generateTupleType(evmType, codeGenForOutput);
default:
throw new UnreachableCaseError(evmType);
}
}