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 { 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);

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

Runtime Info

Pallet
System
Storage Kind
Plain
First Version
v301
Current Version
v411