Limits debug output to prevent abuse.
Current Value
2097152Relevant for: developers
The Big Picture
Contracts can emit debug messages during execution. This limit prevents flooding with debug output. Keep debug messages concise.
From Chain Metadata
The maximum length of the debug buffer in bytes.
Use Cases
- Plan debug logging in contracts
- Understand debugging limitations
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 MaxDebugBufferLen constant
const value = await api.constants.Contracts.MaxDebugBufferLen();
console.log("MaxDebugBufferLen:", value);Type Information
- Type
- u32
- Byte Size
- 4 bytes
- Encoding
- fixed
- Raw Hex
- 0x00002000
Runtime Info
- Pallet
- Contracts
- First Version
- v334
- Latest Version
- v334
- Current Runtime
- v411