Commitments::Error

Variant 507 v393

pallet_commitments::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 (4)

IndexNameFieldsDocs
0TooManyFieldsInCommitmentInfononeAccount passed too many additional fields to their commitment
1AccountNotAllowedCommitnoneAccount is not allowed to make commitments to the chain
2SpaceLimitExceedednoneSpace Limit Exceeded for the current interval
3UnexpectedUnreserveLeftovernoneIndicates that unreserve returned a leftover, which is unexpected.

SCALE Encoding

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

Examples

TooManyFieldsInCommitmentInfo
0x00
00 Variant index 0 = TooManyFieldsInCommitmentInfo
AccountNotAllowedCommit
0x01
01 Variant index 1 = AccountNotAllowedCommit
SpaceLimitExceeded
0x02
02 Variant index 2 = SpaceLimitExceeded

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
507
Kind
Variant
Path
pallet_commitments::pallet::Error
Runtime
v393