cycles-quartz/bisenzone-cw-mvp/contracts/cw-tee-mtcs/src/error.rs

22 lines
414 B
Rust
Raw Normal View History

2023-11-29 21:13:20 +00:00
use cosmwasm_std::StdError;
use libsecp256k1::Error as SecpError;
2023-11-29 21:13:20 +00:00
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ContractError {
#[error("{0}")]
Std(#[from] StdError),
#[error("Unauthorized")]
Unauthorized,
2023-11-29 22:09:57 +00:00
#[error("Invalid pubkey")]
InvalidPubKey(SecpError),
}
impl From<SecpError> for ContractError {
fn from(e: SecpError) -> Self {
Self::InvalidPubKey(e)
}
2023-11-29 21:13:20 +00:00
}