Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Ability to schedule a task with a relatively specified delay #6373

@xlc

Description

@xlc

Currently the pallet-scheduler allow to schedule a task at given block, but we cannot schedule a task 100 blocks after the schedule is been dispatched.

Use case:

We would like the ability to propose a proposal with pallet-democracy that have at least X block delay before enacted and X is more than enactment period that specified with pallet-democracy.

Something like

api.tx.democracy.propose(api.tx.scheduler.schedule_after(X - enactmentPeriod, null, 0, api.tx.myModule.update()))

The current scheduler.schedule cannot be used before we don't know when the proposal will become referendum.

This is what we are using for our scheduler implementation:
https://github.com/open-web3-stack/open-runtime-module-library/blob/38e19c12e3ce852c837432436e44ed023679fbf4/traits/src/lib.rs#L54-L57

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions