fix string array unpack bug in accounts/abi (#18364)

This commit is contained in:
weimumu
2018-12-28 15:43:55 +08:00
committed by Guillaume Ballet
parent 9e9fc87e70
commit 735343430d
3 changed files with 69 additions and 1 deletions

View File

@ -202,7 +202,7 @@ func (arguments Arguments) UnpackValues(data []byte) ([]interface{}, error) {
virtualArgs := 0
for index, arg := range arguments.NonIndexed() {
marshalledValue, err := toGoType((index+virtualArgs)*32, arg.Type, data)
if arg.Type.T == ArrayTy {
if arg.Type.T == ArrayTy && (*arg.Type.Elem).T != StringTy {
// If we have a static array, like [3]uint256, these are coded as
// just like uint256,uint256,uint256.
// This means that we need to add two 'virtual' arguments when