set_base_fee_per_gas

Call v210 → current #0

Manually sets the EIP-1559 base fee (admin only).

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developers

The Big Picture

Override automatic EIP-1559 calculation for emergencies or initialization.

Use Cases

  • Emergency fee adjustment
  • Initialize after upgrade

Input Parameters

#NameTypeDescription
0
fee
U256 fee: 256-bit unsigned integer (Ethereum-style)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Admin/root privileges
  • Valid U256 fee

Effects

Events Emitted

Storage Modified

Postconditions

  • BaseFeePerGas updated
  • NewBaseFeePerGas emitted

Side Effects

  • Affects all subsequent transaction fees

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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 set_base_fee_per_gas call (typed, named args)
const fee = undefined as any /* U256 — replace with real value */;

const tx = api.tx.BaseFee.set_base_fee_per_gas({
  fee,
});

Runtime Info

Pallet Index
25
Call Index
0
First Version
v210
Current Version
v411