This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Atomic transaction annotation for dispatchable calls #6587
Labels
J0-enhancement
An additional feature request.
This issue is a syntax proposal to support atomic transaction annotation for dispatchable calls definition in
decl_module
.The boilerplate
With nested storage supported #6269 , now transaction rollback on error is possible. A typical atomic dispatch call implementation would be:
This pattern would be repeated every time defining an atomic dispatchable call.
The syntax
To avoid repeating the boilerplate, I propose to add an
atomic
(or other names if preferred) annotation syntax, which will wrap the implementation in awith_transaction
commit/rollback pattern as above. The syntax is like:And expanded as:
The text was updated successfully, but these errors were encountered: