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 { 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 MaxDebugBufferLen constant
const value = api.consts[stringCamelCase("Contracts")][stringCamelCase("MaxDebugBufferLen")];
console.log("MaxDebugBufferLen:", value.toHuman());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
- v393