Skip to main content

cw20_escrow/
error.rs

1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug, PartialEq)]
5pub enum ContractError {
6    #[error("{0}")]
7    Std(#[from] StdError),
8
9    #[error("Unauthorized")]
10    Unauthorized {},
11
12    #[error("Only accepts tokens in the cw20_whitelist")]
13    NotInWhitelist {},
14
15    #[error("Escrow is expired")]
16    Expired {},
17
18    #[error("Send some coins to create an escrow")]
19    EmptyBalance {},
20
21    #[error("Escrow id already in use")]
22    AlreadyInUse {},
23}