Crowdloan::Error

Variant 534 v393

pallet_crowdloan::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 (22)

IndexNameFieldsDocs
0DepositTooLownoneThe crowdloan initial deposit is too low.
1CapTooLownoneThe crowdloan cap is too low.
2MinimumContributionTooLownoneThe minimum contribution is too low.
3CannotEndInPastnoneThe crowdloan cannot end in the past.
4BlockDurationTooShortnoneThe crowdloan block duration is too short.
5BlockDurationTooLongnoneThe block duration is too long.
6InsufficientBalancenoneThe account does not have enough balance to pay for the initial deposit/contribution.
7OverflownoneAn overflow occurred.
8InvalidCrowdloanIdnoneThe crowdloan id is invalid.
9CapRaisednoneThe crowdloan cap has been fully raised.
10ContributionPeriodEndednoneThe contribution period has ended.
11ContributionTooLownoneThe contribution is too low.
12InvalidOriginnoneThe origin of this call is invalid.
13AlreadyFinalizednoneThe crowdloan has already been finalized.
14ContributionPeriodNotEndednoneThe crowdloan contribution period has not ended yet.
15NoContributionnoneThe contributor has no contribution for this crowdloan.
16CapNotRaisednoneThe crowdloan cap has not been raised.
17UnderflownoneAn underflow occurred.
18CallUnavailablenoneCall to dispatch was not found in the preimage storage.
19NotReadyToDissolvenoneThe crowdloan is not ready to be dissolved, it still has contributions.
20DepositCannotBeWithdrawnnoneThe deposit cannot be withdrawn from the crowdloan.
21MaxContributorsReachednoneThe maximum number of contributors has been reached.

SCALE Encoding

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

Examples

DepositTooLow
0x00
00 Variant index 0 = DepositTooLow
CapTooLow
0x01
01 Variant index 1 = CapTooLow
MinimumContributionTooLow
0x02
02 Variant index 2 = MinimumContributionTooLow

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
534
Kind
Variant
Path
pallet_crowdloan::pallet::Error
Runtime
v393