astro_token_converter/
error.rs1use cosmwasm_std::{Addr, StdError};
2use cw_utils::PaymentError;
3use thiserror::Error;
4
5use astroport::astro_converter::TIMEOUT_LIMITS;
6
7#[derive(Error, Debug, PartialEq)]
9pub enum ContractError {
10 #[error("{0}")]
11 Std(#[from] StdError),
12
13 #[error("{0}")]
14 PaymentError(#[from] PaymentError),
15
16 #[error(
17 "Invalid endpoint. Consider cw20::send on Terra and converter::convert on Astroport outposts"
18 )]
19 InvalidEndpoint {},
20
21 #[error("Burn is only allowed on Terra")]
22 BurnError {},
23
24 #[error("Transfer to burn is only available on Astroport outposts")]
25 IbcTransferError {},
26
27 #[error("Invalid cw20 token: {0}")]
28 UnsupportedCw20Token(Addr),
29
30 #[error("Invalid timeout: {0}. Max {}s, min {}s", TIMEOUT_LIMITS.end(), TIMEOUT_LIMITS.start())]
31 InvalidTimeout {},
32}