-
Notifications
You must be signed in to change notification settings - Fork 298
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
[WIP] xtokens integrate delay-tasks to delay transfer_assets #981
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should do this with on_idle
to be safer and we will know how many tasks to execute based on remaining weights
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid xcm/xtokens code in this pallet
No description provided.