TransactionAction

Variant 332 v393

ethereum::transaction::legacy::TransactionAction

About This Type

Enum type: TransactionAction.

A tagged union where the first byte selects which variant is active, followed by that variant's data.

Encoding: 1-byte variant index followed by the selected variant's field data.

Variants (2)

IndexNameFieldsDocs
0Call
1Createnone

SCALE Encoding

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

Examples

Call = Call(H160)
0x00<field0>
00 Variant index 0 = Call
field 0 field0: H160
Create
0x01
01 Variant index 1 = Create

Code Examples

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

const registry = new TypeRegistry();

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

Referenced By (4)

Type Information

Type ID
332
Kind
Variant
Path
ethereum::transaction::legacy::TransactionAction
Runtime
v393