Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/learn/learn-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,31 @@ Vesting funds are on a release schedule that unlocks a constant number of tokens
(**linear vesting**) or the full amount after a specific block number (**cliff vesting**). In all
vesting cases, the lock decreases over time until all the funds are transferable.

### Batch Transactions

Batch transactions are single transactions that "batch together" multiple calls. The `utility` pallet is used to dispatch batched calls, and there are three types of batch calls:

- `utility.batch()`: Stops execution if it encounters an error.
- `utility.batchAll()`: Atomic batch execution, meaning that if any call within the batch fails, everything is rolled back as if nothing happened.
- `utility.forceBatch()`: If any transaction fails, it is ignored, and the rest of the transactions are executed.

| Function | Stops on Error | Atomic |
|--------|--------|--------|
| `batch` | Yes | No |
| `batchAll` | Yes | Yes |
| `forceBatch` | No | No |

For more detailed information about the arguments accepted by each of these calls, see [the Metadata Explorer](../general/metadata.md). The emitted events for each call are summarized below:

| Event | Emitted When | part of `batch` | part of `batchAll` | part of `forceBatch` |
|--------|--------|--------|--------|--------|
| `ItemCompleted` | After each batched call succeeds | Yes | Yes | Yes |
| `ItemFailed` | When a batched call fails | No | No | Yes |
| `BatchCompleted` | After all batched calls succeed | Yes | Yes | Yes |
| `BatchCompletedWithErrors` | After all batched calls have been executed, but some were not successful | No | No | Yes |
| `BatchInterrupted` | When a batched call fails and remaining calls are skipped | Yes | No | No |


## Verifying Extrinsics

!!!danger
Expand Down