Crates.io | strategy |
lib.rs | strategy |
version | 0.1.1 |
source | src |
created_at | 2023-09-08 16:54:31.680418 |
updated_at | 2023-09-08 17:47:09.95247 |
description | A framework for writing MEV strategies and bots in Rust |
homepage | |
repository | https://github.com/dennohpeter/strategy |
max_upload_size | |
id | 967467 |
size | 8,235 |
A framework for writing MEV strategies and bots in Rust
Cargo.toml
[dependencies]
strategy = { version = "0.1.1" }
strategy.rs
use strategy::types::Strategy, Event, Action};
pub struct Sandwicher<M> {
provider: Arc<M>
}
impl<M> Sandwicher<M> {
pub fn new(provider: Arc<M>) -> Self {
Self {
provider
}
}
}
#[async_trait]
impl<M: Middleware + 'static> Strategy<Event, Action> for Sandwicher<M> {
async fn process_event(&mut self, event: Event) -> Option<Action> {
// Process incoming event/tx
None
}
}