This is intended to assist with decoding legacy Solidity ABI encodings, specifically as in Solidity v0.4.X and earlier (i.e. before Solidity version 0.5).
Setting this new experimental flag (ABIType.FLAG_LEGACY_DECODE, value 1) during ABIType creation (e.g. when creating a Function or Event) enables an incompatible decoding mode which is local to the object created and the internally-created objects on which it depends (e.g. the object returned by Function#getInputs(). This mode assumes that all byte arrays (including strings) encountered will have no trailing padding bytes. Other behavior such as encoding is not affected. This means that any ABIType, Function, or Event which enables this flag cannot be used to decode specification-compliant encodings. This includes encodings made by these same objects, as their encoding output is still compliant.
If the legacy array flag is not set (for example if you specify ABIType.FLAGS_NONE, value 0) then the ABIType, Function, or Event should expect that all byte arrays have the appropriate padding according to the current ABI specification. In other words, if no flags are set then everything should behave exactly as before in all respects.
Testing and feedback are appreciated and will help ensure correctness and a timely release.
This is intended to assist with decoding legacy Solidity ABI encodings, specifically as in Solidity v0.4.X and earlier (i.e. before Solidity version 0.5).
Setting this new experimental flag (
ABIType.FLAG_LEGACY_DECODE
, value 1) duringABIType
creation (e.g. when creating aFunction
orEvent
) enables an incompatible decoding mode which is local to the object created and the internally-created objects on which it depends (e.g. the object returned byFunction#getInputs()
. This mode assumes that all byte arrays (including strings) encountered will have no trailing padding bytes. Other behavior such as encoding is not affected. This means that anyABIType
,Function
, orEvent
which enables this flag cannot be used to decode specification-compliant encodings. This includes encodings made by these same objects, as their encoding output is still compliant.If the legacy array flag is not set (for example if you specify
ABIType.FLAGS_NONE
, value 0) then theABIType
,Function
, orEvent
should expect that all byte arrays have the appropriate padding according to the current ABI specification. In other words, if no flags are set then everything should behave exactly as before in all respects.Testing and feedback are appreciated and will help ensure correctness and a timely release.