Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Add rescue tokens functionality to the handlers/bridge system #125

Open
3 tasks
drewstone opened this issue Jan 31, 2022 · 0 comments
Open
3 tasks
Labels
p3 🔵 Issues should be resolved eventually

Comments

@drewstone
Copy link
Contributor

drewstone commented Jan 31, 2022

Overview

We want to "rescue tokens" by signature on the Substrate side which can come about using a handler or potentially not. This task should include investigate into the potential routes we can take given Substrate's capabilities.

Details

There is already a treasury account in protocol-substrate and the fees are being sent there:
https://github.com/webb-tools/protocol-substrate/blob/main/pallets/token-wrapper/src/lib.rs#L105
https://github.com/webb-tools/protocol-substrate/blob/main/pallets/token-wrapper/src/lib.rs#L291

So we don't need to implement a separate treasury pallet. What we can instead do is the following:

  • Add a rescue_tokens function to the token-wrapper pallet. This function signature for rescue_tokens should look something like:
fn rescue_tokens(asset_id: T::asset_id, to: T::AccountId, amount_to_rescue: BalanceOf<T>, nonce: u32)
  • Add an execute_rescue_tokens function to the token-wrapper-handler pallet.
  • Test the execution of rescue_tokens via the signature-bridge.
@dutterbutter dutterbutter added the p2 🟡 Issue should be resolved soon label Jan 31, 2022
@dutterbutter dutterbutter added p3 🔵 Issues should be resolved eventually and removed p2 🟡 Issue should be resolved soon labels Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 🔵 Issues should be resolved eventually
Projects
Status: Not Started 🕧
Development

No branches or pull requests

3 participants