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 { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query Schedule constant
const value = api.consts[stringCamelCase("Contracts")][stringCamelCase("Schedule")];
console.log("Schedule:", value.toHuman());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
- v393