Questions tagged [transactional]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer

Dispatch of extrinsic that has prevalidate function which emits events and modifies storage

TLDR: How to implement a substrate unsigned call, which performs storage modifications and emits events during it's validation? If transaction fails, it seems like it leaves garbage in runtime, due ...
6 votes
1 answer

Nested runtime Api's `fn execute_in_transaction` calls no longer supported in v0.9.42?

When upgrading our codebase on top of substrate's polkadot-v0.9.42, we discovered it is no longer possible to make nested request to fn execute_in_transaction(call), from within the call. Given in ...
6 votes
2 answers

Any purpose to add #[transactional] attribute to an extrinsic?

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::...
1 vote
2 answers

The correct way to make a non-extrinsic function execute in a storage layer?

I would like to know how to make non-extrinsic function (trait or otherwise) execute in a storage layer, such that if the function fails with an error, all the storage changes made by the function and ...
4 votes
1 answer

How to annotate extrinsic as non transactional?

it looks like that in version of 28 polkadot was change that extrinsics are by default transactional. Before that we used attribute #[transactional] for specific extrinsic in order to have ...
1 vote
1 answer

Prevent state from being rolled back during an error (transactional)

We're writing a proxy extrinsic that dispatches a child call and consumes a 'free call'. We want to return the error of the child call to the user, but we want to consume a free call regardless. Since ...
2 votes
1 answer

Transactional macro deprecated but still required

Without deprecated transactional macro for extrinsic, the assert_noop!(extrinsic_call, Error::<Test>::BalanceLow) test doesn't work. Not sure if the reason is in orml currencies or if something ...
1 vote
1 answer

Transactional macro cross pallet transaction

Suppose I have the following cross pallet function call // Pallet A : method that sets a storage variable pub fn try_set_value_in_pallet_a(value: u64) -> DispatchResult { ensure!(!value.is_zero(...