Origin
The runtime origin is used by dispatchable functions to check where a call has come from.
Raw origins
Substrate defines three raw origins which can be used in your runtime pallets:
Root: A system level origin. This is the highest privilege level and can be thought of as the superuser of the runtime origin.
Signed: A transaction origin. This is signed by some on-chain account's private key and includes the account identifier of the signer. This allows the runtime to authenticate the source of a dispatch and subsequently charge transaction fees to the associated account.
None: A lack of origin. This needs to be agreed upon by the validators or validated by a module to be included. This origin type is more complex because it is designed to bypass certain runtime mechanisms. For example, this origin type might be used to allow validators to insert data directly into a block.
Origin call
You can construct calls within your runtime with any origin. For example:
Custom origins
In addition to the three core origin types, runtime developers are also able to define custom origins. These can be used as authorization checks inside functions from specific modules in your runtime, or to define custom access-control logic around the sources of runtime requests.
Next steps
Learn more
Examples
View our recipe for creating and using a custom origin.
References
Last updated