Currently, SerializeForVersion is defined in the dto::serialization module. For this reason, we need various odd wrappers to serialize common types, such as this TxnHash type, as well as many others added in https://github.com/eqlabs/pathfinder/pull/2178.
Instead, we can move SerializeForVersion into the dto module, allowing us to implement it directly on the common types and avoid the wrappers.
Admittedly, another reason for these wrappers is to enable this blanket impl, but it's probably more elegant to make a Serde wrapper that delegates to serde::Deserialize and get rid of the blanket impl.
Currently,
SerializeForVersion
is defined in thedto::serialization
module. For this reason, we need various odd wrappers to serializecommon
types, such as this TxnHash type, as well as many others added in https://github.com/eqlabs/pathfinder/pull/2178.Instead, we can move
SerializeForVersion
into thedto
module, allowing us to implement it directly on thecommon
types and avoid the wrappers.