public override GeneratedContractsBundle Generate()
        {
            var bundle = new GeneratedContractsBundle();

            foreach (var contractDescriptor in ContractsMap.Values)
            {
                var contractName = contractDescriptor.XdrContractType.Name;
                bundle.Add(new GeneratedContractFile($"{CaseConversionUtils.ConvertPascalCaseToKebabCase(contractName)}.js", GenerateContractFile(contractDescriptor, contractName)));
                bundle.Add(new GeneratedContractFile($"{CaseConversionUtils.ConvertPascalCaseToKebabCase(contractName + "Serializer")}.js", GenerateSerializerFile(contractDescriptor, contractName)));
            }
            var builder = new StringBuilder("import xdrConverter from '../serialization/xdr-converter'");
            var exports = new List <string>();

            foreach (var file in bundle.Files)
            {
                var fileName  = file.FileName;
                var className = CaseConversionUtils.ConvertKebabCaseToPascalCase(fileName.Split('.')[0]);
                exports.Add(className);
                builder.Append($"\nimport {className} from './{fileName}'");
            }
            builder.Append("\n");
            foreach (var export in exports)
            {
                if (export.EndsWith("Serializer"))
                {
                    builder.Append($"\nxdrConverter.registerSerializer({export.Replace("Serializer", string.Empty)}.name, {export})");
                }
            }
            builder.Append($"\n\nexport {{\n{string.Join(",\n", exports)}\n}}");
            bundle.Add(new GeneratedContractFile("index.js", builder.ToString()));
            return(bundle);
        }
 private string GetContractFileName(Type contractType, string suffix = "")
 {
     return(CaseConversionUtils.ConvertPascalCaseToKebabCase(contractType.Name + suffix));
 }