1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use std::sync::Arc;

use async_trait::async_trait;
use cnidarium::{StateRead, StateWrite};
use filament_chain::{input::Delegate, Transaction};

use crate::handler::Handler;

#[async_trait]
impl Handler for Delegate {
    async fn validate(&self, _tx: Arc<Transaction>) -> eyre::Result<()> {
        // Nothing to assert at this stage.
        Ok(())
    }

    async fn check<S: StateRead>(&self, _state: Arc<S>) -> eyre::Result<()> {
        // TODO(xla): Implement properly, we pass just for the convenience of having an input that
        // succeeds.
        Ok(())
    }

    async fn execute<S: StateWrite>(&self, _state: &mut S) -> eyre::Result<()> {
        // TODO(xla): Implement properly, we pass just for the convenience of having an input that
        // succeeds.
        Ok(())
    }
}