mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi/bind, cmd/abigen: implement java binding tests
This commit is contained in:
parent
334ab967b2
commit
f038f8f3db
4 changed files with 472 additions and 78 deletions
|
|
@ -38,7 +38,6 @@ type Lang int
|
|||
const (
|
||||
LangGo Lang = iota
|
||||
LangJava
|
||||
LangObjC
|
||||
)
|
||||
|
||||
// Bind generates a Go wrapper around a contract ABI. This wrapper isn't meant
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -454,7 +454,7 @@ package {{.Package}};
|
|||
import org.ethereum.geth.*;
|
||||
|
||||
{{range $contract := .Contracts}}
|
||||
public class {{.Type}} {
|
||||
public class {{.Type}} {
|
||||
// ABI is the input ABI used to generate the binding from.
|
||||
public final static String ABI = "{{.InputABI}}";
|
||||
|
||||
|
|
@ -538,6 +538,6 @@ import org.ethereum.geth.*;
|
|||
return this.Contract.transact(opts, "{{.Original.Name}}" , args);
|
||||
}
|
||||
{{end}}
|
||||
}
|
||||
}
|
||||
{{end}}
|
||||
`
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ func main() {
|
|||
lang = bind.LangGo
|
||||
case "java":
|
||||
lang = bind.LangJava
|
||||
case "objc":
|
||||
lang = bind.LangObjC
|
||||
default:
|
||||
fmt.Printf("Unsupported destination language \"%s\" (--lang)\n", *langFlag)
|
||||
os.Exit(-1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue