Crowdloan::Event

Variant 91 v393

pallet_crowdloan::pallet::Event

The `Event` enum of this pallet

About This Type

Event enum for the Event pallet.

Contains all possible events emitted by the Event pallet. Each variant represents a different event type with its own data fields.

Variants (10)

IndexNameFieldsDocs
0Created
crowdloan_id: u32
creator: AccountId
end: u32
cap: u64
A crowdloan was created.
1Contributed
crowdloan_id: u32
contributor: AccountId
amount: u64
A contribution was made to an active crowdloan.
2Withdrew
crowdloan_id: u32
contributor: AccountId
amount: u64
A contribution was withdrawn from a failed crowdloan.
3PartiallyRefunded
crowdloan_id: u32
A refund was partially processed for a failed crowdloan.
4AllRefunded
crowdloan_id: u32
A refund was fully processed for a failed crowdloan.
5Finalized
crowdloan_id: u32
A crowdloan was finalized, funds were transferred and the call was dispatched.
6Dissolved
crowdloan_id: u32
A crowdloan was dissolved.
7MinContributionUpdated
crowdloan_id: u32
new_min_contribution: u64
The minimum contribution was updated.
8EndUpdated
crowdloan_id: u32
new_end: u32
The end was updated.
9CapUpdated
crowdloan_id: u32
new_cap: u64
The cap was updated.

SCALE Encoding

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

Examples

Created = Created(crowdloan_id, creator, end, cap)
0x00<field0><field1><field2><field3>
00 Variant index 0 = Created
field 0 crowdloan_id: u32
field 1 creator: AccountId
field 2 end: u32
field 3 cap: u64
Contributed = Contributed(crowdloan_id, contributor, amount)
0x01<field0><field1><field2>
01 Variant index 1 = Contributed
field 0 crowdloan_id: u32
field 1 contributor: AccountId
field 2 amount: u64
Withdrew = Withdrew(crowdloan_id, contributor, amount)
0x02<field0><field1><field2>
02 Variant index 2 = Withdrew
field 0 crowdloan_id: u32
field 1 contributor: AccountId
field 2 amount: u64

Code Examples

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

const registry = new TypeRegistry();

// Encode Crowdloan::Event — variant "Created"
const value = registry.createType("Crowdloan::Event", { Created: { crowdloan_id: 1000000, creator: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", end: 1000000, cap: 1_000_000_000n } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
91
Kind
Variant
Path
pallet_crowdloan::pallet::Event
Runtime
v393