synor/crates/synor-verifier/src/error.rs
Gulshan Yadav 8b152a5a23 feat(tooling): add Phase 14 M4 - Developer Tooling
Adds formal verification DSL, multi-sig contract, and Hardhat plugin:

synor-verifier crate:
- Verification DSL for contract invariants and properties
- SMT solver integration (Z3 backend optional)
- Symbolic execution engine for path exploration
- Automatic vulnerability detection (reentrancy, overflow, etc.)
- 29 tests passing

contracts/multi-sig:
- M-of-N multi-signature wallet contract
- Transaction proposals with timelock
- Owner management (add/remove)
- Emergency pause functionality
- Native token and contract call support

apps/hardhat-plugin (@synor/hardhat-plugin):
- Network configuration for mainnet/testnet/devnet
- Contract deployment with gas estimation
- Contract verification on explorer
- WASM compilation support
- TypeScript type generation
- Testing utilities (fork, impersonate, time manipulation)
- Synor-specific RPC methods (quantum status, shard info, DAG)
2026-01-19 20:55:56 +05:30

54 lines
1.3 KiB
Rust

//! Error types for the verifier.
use thiserror::Error;
/// Verifier error types.
#[derive(Error, Debug)]
pub enum VerifierError {
/// Parse error in specification.
#[error("Parse error at line {line}: {message}")]
ParseError { line: usize, message: String },
/// Type error in expression.
#[error("Type error: {0}")]
TypeError(String),
/// Unknown variable reference.
#[error("Unknown variable: {0}")]
UnknownVariable(String),
/// Unknown function reference.
#[error("Unknown function: {0}")]
UnknownFunction(String),
/// SMT solver error.
#[error("SMT solver error: {0}")]
SmtError(String),
/// Timeout during verification.
#[error("Verification timeout after {0}ms")]
Timeout(u64),
/// Verification proved false.
#[error("Property falsified: {0}")]
Falsified(String),
/// Internal error.
#[error("Internal error: {0}")]
Internal(String),
/// Unsupported feature.
#[error("Unsupported: {0}")]
Unsupported(String),
/// IO error.
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
/// JSON error.
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
}
/// Result type for verifier operations.
pub type VerifierResult<T> = Result<T, VerifierError>;