Skip to content
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

Adds ability to trigger tasks via unsigned transactions #4075

Merged
merged 13 commits into from
Apr 24, 2024
14 changes: 14 additions & 0 deletions prdoc/pr_4075.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: Adds ability to trigger tasks via unsigned transactions

doc:
- audience: Runtime Dev
description: |
This PR updates the `validate_unsigned` hook for `frame_system` to allow valid tasks
to be submitted as unsigned transactions. It also updates the task example to be able to
submit such transactions via an off-chain worker.

crates:
- name: frame-system
bump: patch
- name: pallet-example-tasks
bump: minor
2 changes: 0 additions & 2 deletions substrate/frame/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,6 @@ pub mod pallet {
#[pallet::call_index(8)]
#[pallet::weight(task.weight())]
pub fn do_task(origin: OriginFor<T>, task: T::RuntimeTask) -> DispatchResultWithPostInfo {
ensure_signed(origin)?;

if !task.is_valid() {
return Err(Error::<T>::InvalidTask.into())
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
Loading