[WIP] xtokens integrate delay-tasks to delay transfer_assets#981
[WIP] xtokens integrate delay-tasks to delay transfer_assets#981wangjj9219 wants to merge 8 commits intomasterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #981 +/- ##
==========================================
- Coverage 85.78% 85.57% -0.21%
==========================================
Files 92 96 +4
Lines 11055 11475 +420
==========================================
+ Hits 9483 9820 +337
- Misses 1572 1655 +83 ☔ View full report in Codecov by Sentry. |
delay-tasks/src/lib.rs
Outdated
| } | ||
|
|
||
| impl<T: Config> Pallet<T> { | ||
| fn _on_finalize(now: BlockNumberFor<T>) { |
There was a problem hiding this comment.
should do this with on_idle to be safer and we will know how many tasks to execute based on remaining weights
xlc
left a comment
There was a problem hiding this comment.
a lot of feature are similar to orml-authoirty, maybe we can just reuse it? e.g. for schedule and cancel task
I see two ways:
modifty orml-authority to use this pallet to do the scheduling code
or have orml-auhtoirty to implement some trait and have this pallet use it
|
|
||
| /// A delayed origin. Can only be dispatched via `dispatch_as` with a delay. | ||
| #[derive(PartialEq, Eq, Clone, RuntimeDebug, Encode, Decode, TypeInfo, MaxEncodedLen)] | ||
| pub struct DelayedExecuteOrigin; |
There was a problem hiding this comment.
should try to reuse the one from orml-authority. we can move it to orml-utils
| } | ||
| } | ||
|
|
||
| pub struct DelayedXtokensTaskHooks<T>(PhantomData<T>); |
There was a problem hiding this comment.
we should avoid xcm/xtokens code in this pallet
No description provided.