ReceiptV4
Variant 517 v393ethereum::receipt::ReceiptV4
About This Type
Enum type: ReceiptV4.
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(EIP658ReceiptData)
0x00<field0>00 Variant index 0 = Legacyfield 0 field0: EIP658ReceiptDataEIP2930 = EIP2930(EIP658ReceiptData)
0x01<field0>01 Variant index 1 = EIP2930field 0 field0: EIP658ReceiptDataEIP1559 = EIP1559(EIP658ReceiptData)
0x02<field0>02 Variant index 2 = EIP1559field 0 field0: EIP658ReceiptDataCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode ReceiptV4 — variant "Legacy"
const value = registry.createType("ReceiptV4", { Legacy: { value: 0 } });
console.log("Hex:", value.toHex());Referenced By (2)
Type Information
- Type ID
- 517
- Kind
- Variant
- Path
- ethereum::receipt::ReceiptV4
- Runtime
- v393