Timestamp::Call

Variant 124 v393

pallet_timestamp::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 (1)

IndexNameFieldsDocs
0setSet the current time. This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time. The timestamp should be greater than the previous one by the amount specified by [`Config::MinimumPeriod`]. The dispatch origin for this call must be _None_. This dispatch class is _Mandatory_ to ensure it gets executed in the block. Be aware that changing the complexity of this call could result exhausting the resources in a block to execute any other calls. ## Complexity - `O(1)` (Note that implementations of `OnTimestampSet` must also be `O(1)`) - 1 storage read and 1 storage mutation (codec `O(1)` because of `DidUpdate::take` in `on_finalize`) - 1 event handler `on_timestamp_set`. Must be `O(1)`.

SCALE Encoding

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

Examples

set = set(now)
0x00<field0>
00 Variant index 0 = set
field 0 now: Compact<u64>

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
124
Kind
Variant
Path
pallet_timestamp::pallet::Call
Runtime
v393