ABIEncoderV2 Bug

Apparently, a bug in the ABIEncoderV2 experimental feature has been found. A fix has been intoduced in Solidity’s 0.5.7 release.

Full blogpost


The bug only manifests itself when all of the following conditions are met:

  • Storage data involving arrays or structs is sent directly to an external function call, to abi.encode or to event data without prior assignment to a local (memory) variable AND
  • there is an array that contains elements with size less than 32 bytes or a struct that has elements that share a storage slot or members of type bytesNN shorter than 32 bytes.