ava-labs / teleporter-token-bridge

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

Multi-hop helpers #141

Closed geoff-vball closed 3 weeks ago

geoff-vball commented 1 month ago

Why this should be merged

Closes https://github.com/ava-labs/teleporter-token-bridge/issues/130

How this works

Creates helpers for processing single-hop and multi-hop functionality for both send and sendAndCall to make the code paths for each clearer.

How this was tested

Existing tests

How is this documented

michaelkaplan13 commented 4 weeks ago

Neither here or there, but thought it'd be worth calling out that all of the _validate helpers could be converted to modifiers if we wanted.

michaelkaplan13 commented 4 weeks ago

I think these changes are really great for readability 🙌 Found 2 more places where I think small helpers would take it even further, but otherwise looks good to go to me.