ExitReason
Variant 75 v393evm_core::error::ExitReason
About This Type
Enum type: ExitReason.
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 | Succeed | ||
| 1 | Error | ||
| 2 | Revert | ||
| 3 | Fatal |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 4 possible variants.
- Size
- variable (1+ bytes)
Examples
Succeed = Succeed(ExitSucceed)
0x00<field0>00 Variant index 0 = Succeedfield 0 field0: ExitSucceedError = Error(ExitError)
0x01<field0>01 Variant index 1 = Errorfield 0 field0: ExitErrorRevert = Revert(ExitRevert)
0x02<field0>02 Variant index 2 = Revertfield 0 field0: ExitRevertCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode ExitReason — variant "Succeed"
const value = registry.createType("ExitReason", { Succeed: { value: 0 } });
console.log("Hex:", value.toHex());Referenced By (4)
Type Information
- Type ID
- 75
- Kind
- Variant
- Path
- evm_core::error::ExitReason
- Runtime
- v393