Defines gas costs for various WASM operations and host functions.
Current Value
0x04000000100000002000000000400000000000400000008060ea000000000000eb040000Relevant for: developers
The Big Picture
Every operation in a contract costs gas. This schedule defines those costs - instruction weights, host function costs, and limits. Essential for writing gas-efficient contracts.
From Chain Metadata
Cost schedule and limits.
Use Cases
- Estimate gas costs for contract calls
- Optimize contract code for gas efficiency
- Plan contract budgets
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 Schedule constant
const value = await api.constants.Contracts.Schedule();
console.log("Schedule:", value);Type Information
- Type
- Schedule
- Byte Size
- variable bytes
- Encoding
- composite
- Raw Hex
- 0x040000001000000020...
Runtime Info
- Pallet
- Contracts
- First Version
- v334
- Latest Version
- v334
- Current Runtime
- v411