This commit is contained in:
Guillaume Ballet 2019-06-28 13:51:55 +02:00
parent 35cbb4f5c2
commit a2a1a1205f
2 changed files with 23 additions and 13 deletions

File diff suppressed because one or more lines are too long

View file

@ -530,6 +530,9 @@ public class {{.Type}} {
// deploy deploys a new Ethereum contract, binding an instance of {{.Type}} to it.
public static {{.Type}} deploy(TransactOpts auth, EthereumClient client{{range .Constructor.Inputs}}, {{bindtype .Type $structs}} {{.Name}}{{end}}) throws Exception {
Interfaces args = Geth.newInterfaces({{(len .Constructor.Inputs)}});
String bytecode = BYTECODE;
{{if .Libraries}}
// "link" contract to dependent libraries by deploying them first.
{{range $pattern, $name := .Libraries}}
{{capitalise $name}} {{decapitalise $name}}Inst = {{capitalise $name}}.deploy(auth, client);