batch_all

Call v120 → current #2

Sends multiple calls atomically, reverting all on any failure.

View calls on chain

Click items to navigate. Pan and zoom to explore.

From Chain Metadata

Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed. May be called from any origin except `None`. `calls`: The calls to be dispatched from the same origin. The number of call must not exceed the constant: `batched_calls_limit` (available in constant metadata). If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing `frame_system::Config::BaseCallFilter`). ## Complexity O(C) where C is the number of calls to be batched.

Input Parameters

#NameTypeDescription
0
calls
Vec<RuntimeCall> Vec Vec<<T as Config>::RuntimeCall>calls (Vec<RuntimeCall>)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Calls array is not empty
  • Calls count <= batched_calls_limit

Effects

Postconditions

  • All calls succeeded (or all reverted)
  • BatchCompleted event if all succeed

Side Effects

  • Atomic - all or nothing execution

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Build batch_all call (typed, named args)
const calls = [] as [];

const tx = api.tx.Utility.batch_all({
  calls,
});

On-Chain Activity

Usage Frequency
●●●●●○ Core 1M–10M extrinsics

Primary protocol calls

#18 most used call

Success Rate Reliable

80–95% of submissions succeed

As of block 7,429,232

Runtime Info

Pallet Index
11
Call Index
2
First Version
v120
Current Version
v411