@@ -280,26 +280,34 @@ private List<MethodSpec> buildFunctionDefinitions(
280280 // constructor will not be specified in ABI file if its empty
281281 if (!constructor ) {
282282 MethodSpec .Builder credentialsMethodBuilder =
283- getDeployMethodSpec (className , Credentials .class , CREDENTIALS , false , true );
283+ getDeployMethodSpec (className , Credentials .class , CREDENTIALS ,
284+ false , true );
284285 methodSpecs .add (buildDeployNoParams (
285- credentialsMethodBuilder , className , CREDENTIALS , false , true ));
286+ credentialsMethodBuilder , className , CREDENTIALS ,
287+ false , true ));
286288
287289 MethodSpec .Builder credentialsMethodBuilderNoGasProvider =
288- getDeployMethodSpec (className , Credentials .class , CREDENTIALS , false , false );
290+ getDeployMethodSpec (className , Credentials .class , CREDENTIALS ,
291+ false , false );
289292 methodSpecs .add (buildDeployNoParams (
290- credentialsMethodBuilderNoGasProvider , className , CREDENTIALS , false , false ));
293+ credentialsMethodBuilderNoGasProvider , className , CREDENTIALS ,
294+ false , false ));
291295
292296 MethodSpec .Builder transactionManagerMethodBuilder =
293297 getDeployMethodSpec (
294- className , TransactionManager .class , TRANSACTION_MANAGER , false , true );
298+ className , TransactionManager .class , TRANSACTION_MANAGER ,
299+ false , true );
295300 methodSpecs .add (buildDeployNoParams (
296- transactionManagerMethodBuilder , className , TRANSACTION_MANAGER , false , true ));
301+ transactionManagerMethodBuilder , className , TRANSACTION_MANAGER ,
302+ false , true ));
297303
298304 MethodSpec .Builder transactionManagerMethodBuilderNoGasProvider =
299305 getDeployMethodSpec (
300- className , TransactionManager .class , TRANSACTION_MANAGER , false , false );
306+ className , TransactionManager .class , TRANSACTION_MANAGER ,
307+ false , false );
301308 methodSpecs .add (buildDeployNoParams (
302- transactionManagerMethodBuilderNoGasProvider , className , TRANSACTION_MANAGER , false , false ));
309+ transactionManagerMethodBuilderNoGasProvider , className , TRANSACTION_MANAGER ,
310+ false , false ));
303311 }
304312
305313 return methodSpecs ;
@@ -328,14 +336,15 @@ Iterable<FieldSpec> buildFuncNameConstants(List<AbiDefinition> functionDefinitio
328336 return fields ;
329337 }
330338
331- private static MethodSpec buildConstructor (Class authType , String authName , boolean withGasProvider ) {
339+ private static MethodSpec buildConstructor (Class authType , String authName ,
340+ boolean withGasProvider ) {
332341 MethodSpec .Builder toReturn = MethodSpec .constructorBuilder ()
333342 .addModifiers (Modifier .PROTECTED )
334343 .addParameter (String .class , CONTRACT_ADDRESS )
335344 .addParameter (Web3j .class , WEB3J )
336345 .addParameter (authType , authName );
337346
338- if (withGasProvider ) {
347+ if (withGasProvider ) {
339348 toReturn .addParameter (ContractGasProvider .class , CONTRACT_GAS_PROVIDER )
340349 .addStatement ("super($N, $N, $N, $N, $N)" ,
341350 BINARY , CONTRACT_ADDRESS , WEB3J , authName , CONTRACT_GAS_PROVIDER );
@@ -362,9 +371,11 @@ private MethodSpec buildDeploy(
362371
363372 if (!inputParams .isEmpty ()) {
364373 return buildDeployWithParams (
365- methodBuilder , className , inputParams , authName , isPayable , withGasProvider );
374+ methodBuilder , className , inputParams , authName ,
375+ isPayable , withGasProvider );
366376 } else {
367- return buildDeployNoParams (methodBuilder , className , authName , isPayable , withGasProvider );
377+ return buildDeployNoParams (methodBuilder , className , authName ,
378+ isPayable , withGasProvider );
368379 }
369380 }
370381
@@ -428,7 +439,8 @@ private static MethodSpec buildDeployNoParams(
428439 }
429440
430441 private static MethodSpec .Builder getDeployMethodSpec (
431- String className , Class authType , String authName , boolean isPayable , boolean withGasProvider ) {
442+ String className , Class authType , String authName ,
443+ boolean isPayable , boolean withGasProvider ) {
432444 MethodSpec .Builder builder = MethodSpec .methodBuilder ("deploy" )
433445 .addModifiers (Modifier .PUBLIC , Modifier .STATIC )
434446 .returns (
@@ -444,8 +456,7 @@ private static MethodSpec.Builder getDeployMethodSpec(
444456 .addParameter (BigInteger .class , INITIAL_VALUE );
445457 } else if (!isPayable && withGasProvider ) {
446458 return builder .addParameter (ContractGasProvider .class , CONTRACT_GAS_PROVIDER );
447- }
448- else {
459+ } else {
449460 return builder .addParameter (BigInteger .class , GAS_PRICE )
450461 .addParameter (BigInteger .class , GAS_LIMIT );
451462 }
@@ -460,7 +471,7 @@ private static MethodSpec buildLoad(
460471 .addParameter (Web3j .class , WEB3J )
461472 .addParameter (authType , authName );
462473
463- if (withGasProvider ) {
474+ if (withGasProvider ) {
464475 toReturn .addParameter (ContractGasProvider .class , CONTRACT_GAS_PROVIDER )
465476 .addStatement ("return new $L($L, $L, $L, $L)" , className ,
466477 CONTRACT_ADDRESS , WEB3J , authName , CONTRACT_GAS_PROVIDER );
0 commit comments