diff options
author | RJ <rj@erisindustries.com> | 2017-01-05 18:46:44 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-01-05 18:46:44 +0800 |
commit | 2126d8148806b6d8597d6a1c761080e9dc98d745 (patch) | |
tree | 82f83bff1c99701b1664120ef269d2ec9aae16d9 /accounts/abi/abi.go | |
parent | 06b381d1c9dd8e47d7862c0846352a0023e53ed0 (diff) | |
download | dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar.gz dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar.bz2 dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar.lz dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar.xz dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.tar.zst dexon-2126d8148806b6d8597d6a1c761080e9dc98d745.zip |
accounts/abi: add support for function types (#3405)
Diffstat (limited to 'accounts/abi/abi.go')
-rw-r--r-- | accounts/abi/abi.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/abi/abi.go b/accounts/abi/abi.go index 4e02ae5f1..c3d49da66 100644 --- a/accounts/abi/abi.go +++ b/accounts/abi/abi.go @@ -169,7 +169,7 @@ func toGoSlice(i int, t Argument, output []byte) (interface{}, error) { // argument in T. func toGoType(i int, t Argument, output []byte) (interface{}, error) { // we need to treat slices differently - if (t.Type.IsSlice || t.Type.IsArray) && t.Type.T != BytesTy && t.Type.T != StringTy && t.Type.T != FixedBytesTy { + if (t.Type.IsSlice || t.Type.IsArray) && t.Type.T != BytesTy && t.Type.T != StringTy && t.Type.T != FixedBytesTy && t.Type.T != FunctionTy { return toGoSlice(i, t, output) } @@ -233,7 +233,7 @@ func toGoType(i int, t Argument, output []byte) (interface{}, error) { return common.BytesToAddress(returnOutput), nil case HashTy: return common.BytesToHash(returnOutput), nil - case BytesTy, FixedBytesTy: + case BytesTy, FixedBytesTy, FunctionTy: return returnOutput, nil case StringTy: return string(returnOutput), nil |