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,
Events 1
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
| Name | Type | Format | Description |
|---|---|---|---|
who | AccountId | SS58 Address | Account that paid the transaction fee |
actual_fee | TaoBalance | — | Total fee paid including base fee and tip (RAO) |
tip | TaoBalance | — | 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
Dynamic fee multiplier that adjusts based on network congestion.
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);Version of the transaction payment pallet's storage schema.
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
Priority boost multiplier for operational extrinsics.
u85import { 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);