BAC-L2-SUB-108Substrate / Polkadot SDK
Extrinsics, dispatch and origins
How a transaction becomes a function call, and how the runtime decides who is allowed to trigger it.
- Level
- L2 — Appchain developer
- Duration
- 4 h
- Maintainer
- Polkadot / Substrate Lead Architect
Learning objectives
- 01Write a signed call, an unsigned call and a governance call
- 02Enforce authorisation through origins rather than manual checks
- 03Explain how a call failing after a state change is handled
Guided lab
Add three calls with distinct origins to the pallet and verify the expected rejections.
Independent lab
Deliberately introduce an access-control flaw, have a peer find it, then fix it.
Security angle
An unsigned call with no validation is an open door: build the validation that closes it.
Assessment
Authorisation tests covering every origin, rejection cases included.
