aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/bind.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/bind/bind.go')
-rw-r--r--accounts/abi/bind/bind.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/accounts/abi/bind/bind.go b/accounts/abi/bind/bind.go
index 7d4a53976..4c9715b74 100644
--- a/accounts/abi/bind/bind.go
+++ b/accounts/abi/bind/bind.go
@@ -44,7 +44,7 @@ const (
// to be used as is in client code, but rather as an intermediate struct which
// enforces compile time type safety and naming convention opposed to having to
// manually maintain hard coded strings that break on runtime.
-func Bind(types []string, abis []string, bytecodes []string, pkg string, lang Lang) (string, error) {
+func Bind(types []string, abis []string, bytecodes []string, fsigs []map[string]string, pkg string, lang Lang) (string, error) {
// Process each individual contract requested binding
contracts := make(map[string]*tmplContract)
@@ -125,6 +125,9 @@ func Bind(types []string, abis []string, bytecodes []string, pkg string, lang La
Transacts: transacts,
Events: events,
}
+ if len(fsigs) > i {
+ contracts[types[i]].FuncSigs = fsigs[i]
+ }
}
// Generate the contract template data content and render it
data := &tmplData{
@@ -180,8 +183,7 @@ func bindBasicTypeGo(kind abi.Type) string {
case abi.BytesTy:
return "[]byte"
case abi.FunctionTy:
- // todo(rjl493456442)
- return ""
+ return "[24]byte"
default:
// string, bool types
return kind.String()
@@ -240,8 +242,7 @@ func bindBasicTypeJava(kind abi.Type) string {
case abi.StringTy:
return "String"
case abi.FunctionTy:
- // todo(rjl493456442)
- return ""
+ return "byte[24]"
default:
return kind.String()
}