Drand::Call

Variant 350 v393

pallet_drand::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 (3)

IndexNameFieldsDocs
0write_pulse
pulses_payload: PulsesPayload
signature: Option
Verify and write a pulse from the beacon into the runtime
1set_beacon_config
signature: Option
allows the root user to set the beacon configuration generally this would be called from an offchain worker context. there is no verification of configurations, so be careful with this. * `origin`: the root user * `config`: the beacon configuration
2set_oldest_stored_round
oldest_round: u64
allows the root user to set the oldest stored round

SCALE Encoding

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

Examples

write_pulse = write_pulse(pulses_payload, signature)
0x00<field0><field1>
00 Variant index 0 = write_pulse
field 0 pulses_payload: PulsesPayload
field 1 signature: Option
set_beacon_config = set_beacon_config(config_payload, signature)
0x01<field0><field1>
01 Variant index 1 = set_beacon_config
field 0 config_payload: BeaconConfigurationPayload
field 1 signature: Option
set_oldest_stored_round = set_oldest_stored_round(oldest_round)
0x02<field0>
02 Variant index 2 = set_oldest_stored_round
field 0 oldest_round: u64

Code Examples

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

const registry = new TypeRegistry();

// Encode Drand::Call — variant "write_pulse"
const value = registry.createType("Drand::Call", { write_pulse: { pulses_payload: 0, signature: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
350
Kind
Variant
Path
pallet_drand::pallet::Call
Runtime
v393