All pallets

TransactionPayment docs

Look up any call, event, or storage item with code examples. Runtime v472 · Block #9,197,056

Developer documentation for the TransactionPayment pallet of the Subtensor blockchain, part of the Bittensor decentralized AI network. This page is designed for developers integrating with the chain: look up any call, event, or storage item, copy code examples in TypeScript, Python, or Rust, and filter by your role. For in-depth explanations, version history, and relationships between items, see the Reference section.

TransactionPayment

A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,

Index: 6 4 items

Events 1

TransactionFeePaid

event details

Emitted when a transaction fee has been paid by an account.

When it fires

  • Transaction has been executed (success or failure)
  • Account has sufficient balance for fees

Fields

NameTypeFormatDescription
whoAccountIdSS58 AddressAccount that paid the transaction fee
actual_feeTaoBalance—Total fee paid including base fee and tip (RAO)
tipTaoBalance—Optional tip for priority inclusion (RAO)
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);

// Subscribe to TransactionFeePaid events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.TransactionPayment.TransactionFeePaid.get(block.hash);
  for (const evt of events) {
    console.log("TransactionFeePaid:", evt.payload);
  }
});

Storage 2

NextFeeMultiplier

storage details

Dynamic fee multiplier that adjusts based on network congestion.

Modifier: Default Keys: 0 Returns: FixedU128
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 NextFeeMultiplier storage (no keys - plain value)
const result = await api.query.TransactionPayment.NextFeeMultiplier.getValue();
console.log("NextFeeMultiplier:", result);

StorageVersion

storage details

Version of the transaction payment pallet's storage schema.

Modifier: Default Keys: 0 Returns: Releases
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 StorageVersion storage (no keys - plain value)
const result = await api.query.TransactionPayment.StorageVersion.getValue();
console.log("StorageVersion:", result);

Constants 1

OperationalFeeMultiplier

constant details

Priority boost multiplier for operational extrinsics.

Type: u8
Value: 5
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 OperationalFeeMultiplier constant
const value = await api.constants.TransactionPayment.OperationalFeeMultiplier();
console.log("OperationalFeeMultiplier:", value);