hyperlane-monorepo
hyperlane-monorepo copied to clipboard
`TokenRouter` unnecessarily branching in `transferRemote`
Problem
https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/3566 introduced the ability to specific hook and metadata overrides to transferRemote
. However, due to a complex inheritance tree of TokenRouter is GasRouter is Router is MailboxClient
, an additional branch was introduced to decide which _dispatch
behavior to inherit.
Additionally, it is not obvious that the GasRouter's intended hook metadata is used.
Solution
We should eliminate this unnecessary branch in the TokenRouter
contract and solve the root cause of the inheritance tree complexity.