TransactionV3
Variant 330 v393ethereum::transaction::TransactionV3
About This Type
Enum type: TransactionV3.
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 (4)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Legacy | ||
| 1 | EIP2930 | ||
| 2 | EIP1559 | ||
| 3 | EIP7702 |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 4 possible variants.
- Size
- variable (1+ bytes)
Examples
Legacy = Legacy(LegacyTransaction)
0x00<field0>00 Variant index 0 = Legacyfield 0 field0: LegacyTransactionEIP2930 = EIP2930(EIP2930Transaction)
0x01<field0>01 Variant index 1 = EIP2930field 0 field0: EIP2930TransactionEIP1559 = EIP1559(EIP1559Transaction)
0x02<field0>02 Variant index 2 = EIP1559field 0 field0: EIP1559TransactionCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode TransactionV3 — variant "Legacy"
const value = registry.createType("TransactionV3", { Legacy: { value: 0 } });
console.log("Hex:", value.toHex());Referenced By (3)
Type Information
- Type ID
- 330
- Kind
- Variant
- Path
- ethereum::transaction::TransactionV3
- Runtime
- v393