-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sequencer)!: take funds from bridge in ics20 withdrawals (#1344)
## Summary Fixes ics20 withdrawals by actually taking funds from the provided bridge address. ## Background Prior to this change, funds were always taken from the signer of the `astria.protocol.v1alpha1.Ics20Withdrawal` action, even if its `bridge_address` field was set. ## Changes - Uses `astria.protocol.v1alpha1.Ics20Withdrawal.bridge_address` to take funds in an ics20 withdrawal if set (and if it passes bridge checks) - Remove unnecessary state accesses to check if enough funds are present: just try to decrease them. If they fail, then the entire action fails. ## Testing All present tests have been updated to check if the correct withdrawal target is found. There should be tests for the entire `Ics20Withdrawal::check_and_execute` flow. However, adding an ibc channel and port does not seem to be currently possible because `penumbra_ibc` does not export the channel `StateWriteExt` trait. This is left to a followup. ## Breaking Changelist This is a breaking change because two different versions of sequencer will come to different conclusions on which account to take funds from. ## Related Issues Closes #1308
- Loading branch information
1 parent
9f959f4
commit d47a374
Showing
2 changed files
with
113 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters