orml-authority
Closed this issue · 2 comments
xlc commented
A PoA governance module with delayed dispatch ability.
-
orml-traits
- Type
- enum DelayedDispatchTime
- Move from schedule-update
- trait Scheduler
- schedule(origin: Origin, call: Call, when: DelayedDispatchTime): DispatchId
- cancel(id: DispatchId)
- enum DelayedDispatchTime
- Type
-
orml-authority
-
Type
- struct DelayedOrigin
- delay: BlockNumber
- origin: Origin
- struct EnsureDelayed<Delay: Get<BlockNumber>, Inner: EnsureOrigin>
- impl EnsureOrigin
- check delay
- use
Inner
to checkorigin
- impl EnsureOrigin
- struct DelayedOrigin
-
Trait
- RootDispatchOrigin: EnsureOrigin
- DelayedRootDispatchOrigin: EnsureOrigin
- DelayedDispatchOrigin: EnsureOrigin
- MinimumDelay: Get<BlockNumber>
- VetoOrigin: EnsureOrigin
- Scheduler: Scheduler
- Call: Dispatchable
-
Calls
- dispatch_root(origin, call: Call)
- Require
RootDispatchOrigin
- Dispatch
call
with root origin
- Require
- schedule_dispatch_root(origin, call: Call, when: DelayedDispatchTime)
- Require
InstanctDispatchOrigin
orDelayedRootDispatchOrigin
ifwhen
>=now + MinimumDelay
- Schedule
call
atwhen
with root origin
- Require
- schedule_dispatch_delayed(origin, call: Call, when: DelayedDispatchTime)
- Require
DelayedDispatchOrigin
- Schedule
call
atwhen
withDelayedOrigin
origin
- Require
- veto(origin, dispatch_id: DispatchId)
- Require
VetoOrigin
- Cancel a scheduled dispatchable
- Require
- dispatch_root(origin, call: Call)
-
Depends on paritytech/substrate#6182 to enable more advanced use cases
xlc commented
This should enable something like
type UpdateOrigin = EnsureDelayed<OneDay, EnsureProportionMoreThan<_1, _2, AccountId, HonzonCouncilInstance>>;
So council can update, but need to wait for at least a day
wangjj9219 commented
closed by paritytech/substrate#200