StorageDeposit
Variant 617 v393pallet_contracts::primitives::StorageDeposit
About This Type
Enum type: StorageDeposit.
A tagged union where the first byte selects which variant is active, followed by that variant's data.
Encoding: 1-byte variant index followed by the selected variant's field data.
Variants (2)
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 2 possible variants.
- Size
- variable (1+ bytes)
Examples
Refund = Refund(u64)
0x00<field0>00 Variant index 0 = Refundfield 0 field0: u64Charge = Charge(u64)
0x01<field0>01 Variant index 1 = Chargefield 0 field0: u64Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode StorageDeposit — variant "Refund"
const value = registry.createType("StorageDeposit", { Refund: { value: 1_000_000_000n } });
console.log("Hex:", value.toHex());Type Parameters
Balance = u64
Referenced By (2)
Type Information
- Type ID
- 617
- Kind
- Variant
- Path
- pallet_contracts::primitives::StorageDeposit
- Runtime
- v393