diff --git a/accounts/abi/bind/topics.go b/accounts/abi/bind/topics.go index 45978641ae..dfb40f122d 100644 --- a/accounts/abi/bind/topics.go +++ b/accounts/abi/bind/topics.go @@ -228,7 +228,9 @@ func parseTopicsIntoMap(out map[string]interface{}, fields abi.Arguments, topics case abi.HashTy: out[arg.Name] = topics[0] case abi.FixedBytesTy: - out[arg.Name] = topics[0][:] + array := reflect.New(arg.Type.Type).Elem() + reflect.Copy(array, reflect.ValueOf(topics[0][:arg.Type.Size])) + out[arg.Name] = array.Interface() case abi.StringTy, abi.BytesTy, abi.SliceTy, abi.ArrayTy: // Array types (including strings and bytes) have their keccak256 hashes stored in the topic- not a hash // whose bytes can be decoded to the actual value- so the best we can do is retrieve that hash