Drand::Error

Variant 530 v393

pallet_drand::pallet::Error

The `Error` enum of this pallet.

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (6)

IndexNameFieldsDocs
0NoneValuenoneThe value retrieved was `None` as no value was previously set.
1StorageOverflownoneThere was an attempt to increment the value in storage over `u32::MAX`.
2DrandConnectionFailurenonefailed to connect to the
3UnverifiedPulsenonethe pulse is invalid
4InvalidRoundNumbernonethe round number did not increment
5PulseVerificationErrornonethe pulse could not be verified

SCALE Encoding

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

Examples

NoneValue
0x00
00 Variant index 0 = NoneValue
StorageOverflow
0x01
01 Variant index 1 = StorageOverflow
DrandConnectionFailure
0x02
02 Variant index 2 = DrandConnectionFailure

Code Examples

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

const registry = new TypeRegistry();

// Encode Drand::Error — variant "NoneValue"
const value = registry.createType("Drand::Error", "NoneValue");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
530
Kind
Variant
Path
pallet_drand::pallet::Error
Runtime
v393