-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
As part of remove-token call, we should also clear storage related to the asset being removed. those are:
- dynamic fess
- oracle entries - needs confirmation
- ??!
Suggested implementation:
Since omnipool is not aware of anything outside itself ( does not know that dynamic fees or oracles store something), it will just send an info out that an asset has been removed from omnipool.
- take advantage of existing OmnipoolHooks trait
- add a new method - on_asset_removed( asset Id ). It returns nothing. We dont want to fail, so no need an error.
- just call the hook when asset is removed from omnipool.
- runtime implementation will take care of cleanup
- this will allow us extending the cleanup of other stuff in future ( if necessary ) without making additional changes to the omnipool pallet.
Tests:
- needs a unit test to ensure the hook is called
- needs integration tests to ensure cleanup works as exepcted
Benchmarking
- need to benchmarks the cleanup implementation
- and add weight to the omnipool's extrinsic explicitly (similar to other hooks)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers