ava-labs / teleporter-token-bridge

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

Handle registerWithSource message fees #139

Closed minghinmatthewlam closed 4 weeks ago

minghinmatthewlam commented 1 month ago

Why this should be merged

With recent changes to registering destinations on the source bridge, and separate fee changes, there was an additional external registerWithSource call. This call takes in a fee but needs to be transferred to the bridge contract before sending Teleporter message, otherwise would revert.

How this works

Moves logic into helper _handleFees, and calls handling of fees for registerWithSource

How this was tested

Updated e2e tests to deploy a new example ERC20 token to use as fees for registering with source.

How is this documented

comments

michaelkaplan13 commented 4 weeks ago

Fixes #138