Implement the complete mapping of all Budget category error subcodes. Budget errors are the most frequently encountered Soroban errors, they fire when a transaction exceeds its allocated CPU instructions, memory bytes, or other metered resources. This mapping lets Prism distinguish between "you ran out of CPU" and "you ran out of memory."
Implementation Guidelines
- Create
crates/core/src/decode/mappings/budget.rs
- Define
BudgetErrorDetail struct: code, name, summary, severity (using an ErrorSeverity enum: Critical/Error/Warning/Info)
- Map all known subcodes from
soroban-env-host (ExceededLimit, InsufficientInstructions, InsufficientMemory, etc.) with a fallback for unrecognized codes
Expectations
- What done looks like: Every known Budget subcode maps to a named, described error with severity.
Implement the complete mapping of all Budget category error subcodes. Budget errors are the most frequently encountered Soroban errors, they fire when a transaction exceeds its allocated CPU instructions, memory bytes, or other metered resources. This mapping lets Prism distinguish between "you ran out of CPU" and "you ran out of memory."
Implementation Guidelines
crates/core/src/decode/mappings/budget.rsBudgetErrorDetailstruct:code,name,summary,severity(using anErrorSeverityenum: Critical/Error/Warning/Info)soroban-env-host(ExceededLimit,InsufficientInstructions,InsufficientMemory, etc.) with a fallback for unrecognized codesExpectations