aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/unpack.go
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/abi/unpack.go')
-rw-r--r--accounts/abi/unpack.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/accounts/abi/unpack.go b/accounts/abi/unpack.go
index c3bbbb251..04716f7a2 100644
--- a/accounts/abi/unpack.go
+++ b/accounts/abi/unpack.go
@@ -195,8 +195,15 @@ func toGoType(index int, t Type, output []byte) (interface{}, error) {
switch t.T {
case SliceTy:
+ if (*t.Elem).T == StringTy {
+ return forEachUnpack(t, output[begin:], 0, end)
+ }
return forEachUnpack(t, output, begin, end)
case ArrayTy:
+ if (*t.Elem).T == StringTy {
+ offset := int64(binary.BigEndian.Uint64(returnOutput[len(returnOutput)-8:]))
+ return forEachUnpack(t, output[offset:], 0, t.Size)
+ }
return forEachUnpack(t, output, index, t.Size)
case StringTy: // variable arrays are written at the end of the return bytes
return string(output[begin : begin+end]), nil