Description
When Soroban contracts panic or return custom error types (e.g. Error(Contract, #1)), Crucible should automatically decode the error variant back to the enum name and source line.
Location
contracts/crucible/src/env.rs:
contracts/crucible/src/env.rs
// Location: contracts/crucible/src/env.rs // Production requirement: Comprehensive Error Variant & Panic Reason Demangler
Impact
Raw numerical error codes force developers to cross-reference contract source files manually.
Required Fix
- Implement error mapping registry parsing contract
ContractError definitions.
- Enhance
assert_reverts! macro to assert against custom error enums with clear formatted assertion diffs.
- Write tests validating enum demangling across multi-contract error bubbling.
Reference
Identified during Crucible Core Testing Framework production readiness audit.
Description
When Soroban contracts panic or return custom error types (e.g.
Error(Contract, #1)), Crucible should automatically decode the error variant back to the enum name and source line.Location
contracts/crucible/src/env.rs:
// Location: contracts/crucible/src/env.rs // Production requirement: Comprehensive Error Variant & Panic Reason DemanglerImpact
Raw numerical error codes force developers to cross-reference contract source files manually.
Required Fix
ContractErrordefinitions.assert_reverts!macro to assert against custom error enums with clear formatted assertion diffs.Reference
Identified during Crucible Core Testing Framework production readiness audit.