Drand::Error
Variant 510 v411pallet_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)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | NoneValue | none | The value retrieved was `None` as no value was previously set. |
| 1 | StorageOverflow | none | There was an attempt to increment the value in storage over `u32::MAX`. |
| 2 | DrandConnectionFailure | none | failed to connect to the |
| 3 | UnverifiedPulse | none | the pulse is invalid |
| 4 | InvalidRoundNumber | none | the round number did not increment |
| 5 | PulseVerificationError | none | the 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
0x0000 Variant index 0 = NoneValueStorageOverflow
0x0101 Variant index 1 = StorageOverflowDrandConnectionFailure
0x0202 Variant index 2 = DrandConnectionFailureCode 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
Also See
Type Information
- Type ID
- 510
- Kind
- Variant
- Path
- pallet_drand::pallet::Error
- Runtime
- v411