ExtrinsicWeightReclaimed

Storage Plain v301 → current

Weight reclaimed from current extrinsic .

Explore chain
Queried by: validatorsdevelopers

The Big Picture

When actual weight is less than estimated, the difference is reclaimed.

Use Cases

  • Fee calculation

From Chain Metadata

The weight reclaimed for the extrinsic. This information is available until the end of the extrinsic execution. More precisely this information is removed in `note_applied_extrinsic`. Logic doing some post dispatch weight reduction must update this storage to avoid duplicate reduction.

Purpose & Usage

Purpose

Track weight refunds during extrinsic execution.

Common Query Patterns

  • Query during extrinsic execution

Stored Value

value (Weight)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query ExtrinsicWeightReclaimed storage (no keys - plain value)
const result = await api.query
  [stringCamelCase("System")]
  [stringCamelCase("ExtrinsicWeightReclaimed")]();
console.log("ExtrinsicWeightReclaimed:", result.toHuman());

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v301
Current Version
v393