2023-11-29 21:13:20 +00:00
|
|
|
use cosmwasm_std::StdError;
|
2023-11-29 22:09:57 +00:00
|
|
|
use ecies::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
|
|
|
}
|