ava-labs / teleporter-token-bridge

Token bridging cross-chain built on top of Teleporter
Other
10 stars 5 forks source link

Consider separating send interfaces for single-hop vs multi-hop #130

Closed michaelkaplan13 closed 3 weeks ago

michaelkaplan13 commented 1 month ago

Context and scope Currently the send and sendAndCall interfaces of the bridge contracts both support single and multi-hop transfers. The information needed for both cases is provided in the SendTokensInput and SendAndCallInput. However, this results in some field of the respective inputs being unused in the single-hop case.

Discussion and alternatives and Open questions Would splitting those interface into two (ie. send and sendMultiHop) allow for more clear usage and cleaner implementation?