EVM::Event

Variant 83 v393

pallet_evm::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 (5)

IndexNameFieldsDocs
0Log
log: Log
Ethereum events from contracts.
1Created
address: H160
A contract has been created at given address.
2CreatedFailed
address: H160
A contract was attempted to be created, but the execution failed.
3Executed
address: H160
A contract has been executed successfully with states applied.
4ExecutedFailed
address: H160
A contract has been executed with errors. States are reverted with only gas fees applied.

SCALE Encoding

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

Examples

Log = Log(log)
0x00<field0>
00 Variant index 0 = Log
field 0 log: Log
Created = Created(address)
0x01<field0>
01 Variant index 1 = Created
field 0 address: H160
CreatedFailed = CreatedFailed(address)
0x02<field0>
02 Variant index 2 = CreatedFailed
field 0 address: H160

Code Examples

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

const registry = new TypeRegistry();

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

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
83
Kind
Variant
Path
pallet_evm::pallet::Event
Runtime
v393