6

Could you help me to understand if there is any special purpose to add a #[transactional] attribute to an extrinsic?

For instance, in pallet-uniques there is a call buy_item tagged with frame_support::transactional attribute: github.com/parity/substrate/frame/uniques/src/lib.rs#L1526.

Aren't all the functions under #[pallet::call] transactional by default?

2 Answers 2

6

I think that's a history code.

All the calls are transactional by default in the latest Substrate version.

5

Yes the extrinsics are transactional by default. In fact, if you need to make them non transactional you'd need to mark them accordingly as explained here. The transactional tag is just a legacy thing remained from when it wasn't the default behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.