This ERC standardizes a convention for tagging ABI-encoded structures placed inside bytes parameters with a compact type selector derived from the EIP-712 type string.
It also defines a canonical multi-payload wrapper, allowing multiple typed payloads to be carried in a single bytes parameter.
Many smart contract methods use a bytes parameter to support future extensibility—including common standards such as ERC-721 and ERC-1155.
The convention of carrying extra data in a bytes parameter was also codified further in ERC-5750.
In many practical cases, the bytes payload may encode a structured type that must be ABI-decoded before it can be processed. However:
Currently, there is no standardized convention for identifying the "type" of an encoded payload, nor for supporting multiple data items in a single bytes parameter. This ERC defines a minimal, interoperable convention for self-describing payloads that remain compatible with existing ABI tooling.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
TransferNote(bytes32 reference,string comment,uint256 deadline)bytes4) — keccak256(typeString)[0:4]abi.encode of that struct’s fieldsDataList(bytes[] items); each items[i] is a valid single-payloadExample:
A consumer may look for a known selector before attempting to decode the data, and can easily distinguish between multiple different payloads that it knows how to accept.
DataList(bytes[] items) with selector 0xae74f986.Each items[i] MUST be a valid single-payload as above.
Consumers can look for this well-known selector, and can then decode the list to be scanned recursively for recognized items.
0xae74f986, decode the remainder as (bytes[] items) and parse each item recursively.DataList provides multiplexing without special parsing or new ABI rules.Existing contracts that already accept arbitrary bytes remain compatible. Contracts unaware of this ERC can continue to treat the payload as opaque.
DataList, consumers should limit items.length and total payload size (for example ≤ 8 items and ≤ 8 KB).Copyright and related rights waived via CC0.