feat(server::evm::engine): return meaning on error path

This commit is contained in:
hdbg
2026-03-09 20:58:04 +01:00
parent c5f9cfcaa0
commit 43c7b211c3
2 changed files with 32 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ pub struct Grant<PolicySettings> {
pub trait Policy: Sized {
type Settings: Send + Sync + 'static + Into<SpecificGrant>;
type Meaning: Display + Send + Sync + 'static + Into<SpecificMeaning>;
type Meaning: Display + std::fmt::Debug + Send + Sync + 'static + Into<SpecificMeaning>;
fn analyze(context: &EvalContext) -> Option<Self::Meaning>;
@@ -114,6 +114,7 @@ pub enum ReceiverTarget {
}
// Classification of what transaction does
#[derive(Debug)]
pub enum SpecificMeaning {
EtherTransfer(ether_transfer::Meaning),
TokenTransfer(token_transfers::Meaning),