Semantic Layer Specification
ERC-1066Unified "language" of status codes used by ERC-1066-x402 to enable machine-readable transaction feedback.
Overview
Status codes are 1-byte identifiers (represented as hex 0xXX in EVM and u16 in Solana/Sui) that represent the outcome of an intent validation or execution.
Core Status Map
Standard status codes and their HTTP mappings:
| ID | Hex | Name | HTTP Map |
|---|---|---|---|
| 1 | 0x01 | S_SUCCESS | 200 |
| 16 | 0x10 | S_DISALLOWED | 403 |
| 17 | 0x11 | S_ALLOWED | 200 |
| 32 | 0x20 | S_TOO_EARLY | 202 |
| 33 | 0x21 | S_TOO_LATE | 410 |
| 34 | 0x22 | S_NONCE_USED | 409 |
| 80 | 0x50 | S_TRANSFER_FAILED | 500 |
| 84 | 0x54 | S_INSUFFICIENT_FUNDS | 402 |
| 160 | 0xA0 | S_INVALID_FORMAT | 400 |
| 162 | 0xA2 | S_UNSUPPORTED_CHAIN | 421 |
Byte Encoding Rules
EVM (Solidity)
Implemented as bytes1 in StatusCodes.sol
Return values from canExecute should be explicitly cast to bytes1
Solana (Rust)
Implemented as u16 constants in status.rs
Mapped to ProgramError::Custom(status)
Sui (Move)
Implemented as u64 constants in intent_framework.move
Mapped to module-specific abort codes
Machine-Readable Branching
AI agents must use these codes to determine their next action:
0x11→ Callexecute()0x54→ Request funds from Facilitator0x20→ Wait and retry