Preimage::Call

Variant 166 v393

pallet_preimage::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (5)

IndexNameFieldsDocs
0note_preimage
bytes: Vec<u8>
Register a preimage on-chain. If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage.
1unnote_preimage
hash: H256
Clear an unrequested preimage from the runtime storage. If `len` is provided, then it will be a much cheaper operation. - `hash`: The hash of the preimage to be removed from the store. - `len`: The length of the preimage of `hash`.
2request_preimage
hash: H256
Request a preimage be uploaded to the chain without paying any fees or deposits. If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands.
3unrequest_preimage
hash: H256
Clear a previously made request for a preimage. NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`.
4ensure_updated
hashes: Vec<H256>
Ensure that the bulk of pre-images is upgraded. The caller pays no fee if at least 90% of pre-images were successfully updated.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 5 possible variants.
Size
variable (1+ bytes)

Examples

note_preimage = note_preimage(bytes)
0x00<field0>
00 Variant index 0 = note_preimage
field 0 bytes: Vec<u8>
unnote_preimage = unnote_preimage(hash)
0x01<field0>
01 Variant index 1 = unnote_preimage
field 0 hash: H256
request_preimage = request_preimage(hash)
0x02<field0>
02 Variant index 2 = request_preimage
field 0 hash: H256

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Preimage::Call — variant "note_preimage"
const value = registry.createType("Preimage::Call", { note_preimage: { bytes: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
166
Kind
Variant
Path
pallet_preimage::pallet::Call
Runtime
v393