DepositPerItem

Constant v334 → current u64

Charges for storage structure, not just bytes.

Current Value

0.000000075 TAO (75 raw)

Conversion: ÷ 10^9 (RAO → TAO)

Relevant for: developers

The Big Picture

Beyond bytes, each storage key costs a flat deposit. This discourages creating many small items. Total storage deposit = (items * DepositPerItem) + (bytes * DepositPerByte).

From Chain Metadata

The amount of balance a caller has to pay for each storage item. # Note Changing this value for an existing chain might need a storage migration.

Use Cases

  • Estimate storage costs for contract state
  • Optimize storage item count

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

// Convert RAO to TAO if this is a balance value
const taoValue = value.toBigInt() / BigInt(1e9);
console.log("TAO:", taoValue.toString());

Type Information

Type
u64
Byte Size
8 bytes
Encoding
fixed
Raw Hex
0x4b00000000000000

Runtime Info

Pallet
Contracts
First Version
v334
Latest Version
v334
Current Runtime
v393