Skip to main content

agglayer_tries/
error.rs

1use serde::{Deserialize, Serialize};
2use thiserror::Error;
3
4#[derive(Error, Debug, Eq, PartialEq, Serialize, Deserialize, Clone)]
5pub enum SmtError {
6    #[error("trying to insert a key already in the SMT")]
7    KeyAlreadyPresent,
8    #[error("trying to generate a Merkle proof for a key not in the SMT")]
9    KeyNotPresent,
10    #[error("trying to generate a non-inclusion proof for a key present in the SMT")]
11    KeyPresent,
12    #[error("depth out of bounds")]
13    DepthOutOfBounds,
14}