System::Event

Variant 22 v393

frame_system::pallet::Event

Event for the System 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 (8)

IndexNameFieldsDocs
0ExtrinsicSuccess
dispatch_info: DispatchEventInfo
An extrinsic completed successfully.
1ExtrinsicFailed
dispatch_error: DispatchError
dispatch_info: DispatchEventInfo
An extrinsic failed.
2CodeUpdatednone`:code` was updated.
3NewAccount
account: AccountId
A new account was created.
4KilledAccount
account: AccountId
An account was reaped.
5Remarked
sender: AccountId
hash: H256
On on-chain remark happened.
6UpgradeAuthorized
code_hash: H256
check_version: bool
An upgrade was authorized.
7RejectedInvalidAuthorizedUpgrade
code_hash: H256
An invalid authorized upgrade was rejected while trying to apply it.

SCALE Encoding

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

Examples

ExtrinsicSuccess = ExtrinsicSuccess(dispatch_info)
0x00<field0>
00 Variant index 0 = ExtrinsicSuccess
field 0 dispatch_info: DispatchEventInfo
ExtrinsicFailed = ExtrinsicFailed(dispatch_error, dispatch_info)
0x01<field0><field1>
01 Variant index 1 = ExtrinsicFailed
field 0 dispatch_error: DispatchError
field 1 dispatch_info: DispatchEventInfo
CodeUpdated
0x02
02 Variant index 2 = CodeUpdated

Code Examples

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

const registry = new TypeRegistry();

// Encode System::Event — variant "ExtrinsicSuccess"
const value = registry.createType("System::Event", { ExtrinsicSuccess: { dispatch_info: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
22
Kind
Variant
Path
frame_system::pallet::Event
Runtime
v393