Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sequencer)!: implement
BridgeTransfer
action (#1934)
## Summary implement `BridgeTransfer` action which transfers funds from one bridge account to another. essentially, it atomically performs a `BridgeUnlock` and a `BridgeLock`. ## Background this is functionality we want and `BridgeUnlock`ing to another bridge account wouldn't create a `Deposit` correctly. the issue is that `BridgeUnlock` does not contain all the information needed to create a deposit event, namely `destination_chain_address`, so `BridgeUnlock` directly into another bridge account doesn't work as a lock. `BridgeLock` from a bridge account to another also doesn't contain the desired withdrawal information (eg `rollup_withdrawal_event_id`). an atomic `BridgeUnlock`/`BridgeLock` combo would only work if the `BridgeUnlock` unlocks the funds to itself, providing `rollup_withdrawal_event_id`, and then `BridgeLock`s to the receiving account. `BridgeUnlock` cannot go directly into a different account as the bridge would no longer be able to access it. however this seems unwieldly as opposed to just having one action which makes the intention clear. ## Changes - slightly refactor `BridgeUnlock` to move checks to their own function - also slightly refactor `BridgeLock` to move execution and `Deposit` emission to their own function - implement `BridgeTransfer` action using existing `BridgeUnlock` checks and `BridgeLock` execution logic. ## Testing unit tests ## Changelogs Changelogs updated. ## Breaking Changelist - a new action was added, which is a breaking sequencer change. ## Related Issues closes #1921
- Loading branch information