-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
p3 π΅Issues should be resolved eventuallyIssues should be resolved eventually
Description
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_tokensfunction to thetoken-wrapperpallet. This function signature forrescue_tokensshould 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_tokensfunction to thetoken-wrapper-handlerpallet. - Test the execution of
rescue_tokensvia thesignature-bridge.
Metadata
Metadata
Assignees
Labels
p3 π΅Issues should be resolved eventuallyIssues should be resolved eventually
Type
Projects
Status
Not Started π§