Skip to content

Commit f5541aa

Browse files
filippoweb3laboon
andauthored
Add batch transfers info (#6772)
* added info * Update docs/learn/learn-transactions.md Co-authored-by: Bill Laboon <laboon@users.noreply.github.com> * Bill's feedback * tiny edit * Update docs/learn/learn-transactions.md Co-authored-by: Bill Laboon <laboon@users.noreply.github.com> * Update docs/learn/learn-transactions.md Co-authored-by: Bill Laboon <laboon@users.noreply.github.com> * Update docs/learn/learn-transactions.md Co-authored-by: Bill Laboon <laboon@users.noreply.github.com> * added events info * added details events --------- Co-authored-by: Bill Laboon <laboon@users.noreply.github.com>
1 parent d647203 commit f5541aa

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/learn/learn-transactions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,31 @@ Vesting funds are on a release schedule that unlocks a constant number of tokens
9090
(**linear vesting**) or the full amount after a specific block number (**cliff vesting**). In all
9191
vesting cases, the lock decreases over time until all the funds are transferable.
9292

93+
### Batch Transactions
94+
95+
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:
96+
97+
- `utility.batch()`: Stops execution if it encounters an error.
98+
- `utility.batchAll()`: Atomic batch execution, meaning that if any call within the batch fails, everything is rolled back as if nothing happened.
99+
- `utility.forceBatch()`: If any transaction fails, it is ignored, and the rest of the transactions are executed.
100+
101+
| Function | Stops on Error | Atomic |
102+
|--------|--------|--------|
103+
| `batch` | Yes | No |
104+
| `batchAll` | Yes | Yes |
105+
| `forceBatch` | No | No |
106+
107+
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:
108+
109+
| Event | Emitted When | part of `batch` | part of `batchAll` | part of `forceBatch` |
110+
|--------|--------|--------|--------|--------|
111+
| `ItemCompleted` | After each batched call succeeds | Yes | Yes | Yes |
112+
| `ItemFailed` | When a batched call fails | No | No | Yes |
113+
| `BatchCompleted` | After all batched calls succeed | Yes | Yes | Yes |
114+
| `BatchCompletedWithErrors` | After all batched calls have been executed, but some were not successful | No | No | Yes |
115+
| `BatchInterrupted` | When a batched call fails and remaining calls are skipped | Yes | No | No |
116+
117+
93118
## Verifying Extrinsics
94119

95120
!!!danger

0 commit comments

Comments
 (0)