Skip to content

Commit

Permalink
Add generateBoth flag
Browse files Browse the repository at this point in the history
Signed-off-by: Bilyana Gospodinova <bilyana.gospodinova14@gmail.com>
  • Loading branch information
bilyana-gospodinova committed Aug 8, 2024
1 parent 4dfeca2 commit 10e53e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ plugins {
id "de.undercouch.download" version "4.1.2"
id "de.marcphilipp.nexus-publish" version "0.4.0"
id 'io.codearte.nexus-staging' version '0.30.0'
id "com.jfrog.bintray" version "1.8.4"
}

description 'Web3j command line tools'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.io.File;

import org.web3j.tx.Contract;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;

Expand Down Expand Up @@ -94,6 +95,11 @@ public class SolidityGenerateCommand implements Runnable {
description = "Use Java primitive types.")
private boolean primitiveTypes = false;

@Option(
names = {"-B", "--generateBoth"},
description = "Generate both send_ and call_ functions.")
private boolean generateBoth = false;

@Override
public void run() {
try {
Expand All @@ -111,7 +117,10 @@ public void run() {
packageName,
useJavaTypes,
primitiveTypes,
addressLength)
generateBoth,
Contract.class,
addressLength,
false)
.generate();
} catch (Exception e) {
exitError(e);
Expand Down

0 comments on commit 10e53e5

Please sign in to comment.