NethermindEth / zksync-remix-plugin

Remix plugin for zkSync
MIT License
14 stars 10 forks source link

Verification + refactoring with preparations to generalization #202

Closed taco-paco closed 1 month ago

taco-paco commented 2 months ago

204

The main idea behind the refactoring is to prepare for the future extraction of main components into a separate library. The following components may roughly be noticed already.

pub trait MessageProcessor {
    type Message;
    async fn process_message(&self, message: Self::Message) -> impl Into<TaskResult>;
}
pub trait InputPreparator {
     type Request;
     type Output;
     async fn prepare_input(&self, request: &Self::Request) -> Result<Self::Output>;
}
pub trait MessageValidator {
     type Message;
     async fn validate(&self, message: &Self::Message) -> Result<()>
}