private static ABIConfiguration CreateAbiConfiguration(string abiFile, string projectFolder, string projectName, string assemblyName, CodeGenLanguage language)
        {
            var contractName = Path.GetFileNameWithoutExtension(abiFile);

            var binFileName = Path.Combine(Path.GetDirectoryName(abiFile), contractName + ".bin");
            var byteCode    = File.Exists(binFileName) ? File.ReadAllText(binFileName) : string.Empty;

            var abiConfig = new ABIConfiguration
            {
                CodeGenLanguage = language,
                ABI             = File.ReadAllText(abiFile),
                ByteCode        = byteCode,
                ContractName    = contractName
            };

            SetDefaults(projectFolder, projectName, assemblyName, abiConfig);
            return(abiConfig);
        }
        private static void SetDefaults(string destinationProjectFolder, string projectName, string assemblyName, ABIConfiguration abiConfiguration)
        {
            var defaultNamespace = Path.GetFileNameWithoutExtension(assemblyName);

            if (string.IsNullOrEmpty(abiConfiguration.BaseOutputPath))
            {
                abiConfiguration.BaseOutputPath = destinationProjectFolder;
            }

            if (string.IsNullOrEmpty(abiConfiguration.BaseNamespace))
            {
                abiConfiguration.BaseNamespace = defaultNamespace;
            }

            if (string.IsNullOrEmpty(abiConfiguration.CQSNamespace))
            {
                abiConfiguration.CQSNamespace = abiConfiguration.ContractName + ".CQS";
            }

            if (string.IsNullOrEmpty(abiConfiguration.DTONamespace))
            {
                abiConfiguration.DTONamespace = abiConfiguration.ContractName + ".DTO";
            }

            if (string.IsNullOrEmpty(abiConfiguration.ServiceNamespace))
            {
                abiConfiguration.ServiceNamespace = abiConfiguration.ContractName + ".Service";
            }
        }