Crowdloan::Event
Variant 91 v393pallet_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)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Created | A crowdloan was created. | |
| 1 | Contributed | A contribution was made to an active crowdloan. | |
| 2 | Withdrew | A contribution was withdrawn from a failed crowdloan. | |
| 3 | PartiallyRefunded | crowdloan_id: u32 | A refund was partially processed for a failed crowdloan. |
| 4 | AllRefunded | crowdloan_id: u32 | A refund was fully processed for a failed crowdloan. |
| 5 | Finalized | crowdloan_id: u32 | A crowdloan was finalized, funds were transferred and the call was dispatched. |
| 6 | Dissolved | crowdloan_id: u32 | A crowdloan was dissolved. |
| 7 | MinContributionUpdated | The minimum contribution was updated. | |
| 8 | EndUpdated | The end was updated. | |
| 9 | CapUpdated | 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 = Createdfield 0 crowdloan_id: u32field 1 creator: AccountIdfield 2 end: u32field 3 cap: u64Contributed = Contributed(crowdloan_id, contributor, amount)
0x01<field0><field1><field2>01 Variant index 1 = Contributedfield 0 crowdloan_id: u32field 1 contributor: AccountIdfield 2 amount: u64Withdrew = Withdrew(crowdloan_id, contributor, amount)
0x02<field0><field1><field2>02 Variant index 2 = Withdrewfield 0 crowdloan_id: u32field 1 contributor: AccountIdfield 2 amount: u64Code 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)
#21 RuntimeEvent via System#21 RuntimeEvent via Grandpa#21 RuntimeEvent via Balances#21 RuntimeEvent via TransactionPayment#21 RuntimeEvent via SubtensorModule#21 RuntimeEvent via Utility#21 RuntimeEvent via Sudo#21 RuntimeEvent via Multisig#21 RuntimeEvent via Preimage#21 RuntimeEvent via Scheduler#21 RuntimeEvent via Proxy#21 RuntimeEvent via Registry#21 RuntimeEvent via Commitments#21 RuntimeEvent via AdminUtils#21 RuntimeEvent via SafeMode#21 RuntimeEvent via Ethereum#21 RuntimeEvent via EVM#21 RuntimeEvent via BaseFee#21 RuntimeEvent via Drand#21 RuntimeEvent via Crowdloan
and 3 more...
Also See
Type Information
- Type ID
- 91
- Kind
- Variant
- Path
- pallet_crowdloan::pallet::Event
- Runtime
- v393