Streamline Msg
trait definition
#993
Labels
O: maintainability
Objective: cause to ease modification, fault corrections and improve code understanding
Milestone
Context
The
Msg
trait definition within theibc-primitives
can be streamlined because:With the release of
ibc-proto-rs
v0.38.0, theProtobuf
trait is now re-exported fromtendermint-proto
. ThisProtobuf
is not object-safe, and it is no longer necessary to satisfy earlier conditions that was limiting us to useProtobuf
as a trait bound for other traits, thereby we now can discard theget_sign_bytes
method.Another update comes from
prost
v0.12.3, introduced as ofibc-proto-rs
v0.39.1. With this version, we gain access to the autoprost::Name
derive, which implements a similar method to thetype_url
method. Therefore, with the proper type restriction, thetype_url
method becomes obsolete too.Additionally, the
Msg
trait's naming should be more reflective of its broader use case. It can now be implemented on other types beyond IBC messages, such asClientState
. In general, this trait defines the interaction/conversion between a domain type and its associated proto types.Prerequisites
The text was updated successfully, but these errors were encountered: