1use cosmwasm_std::StdError;
2use thiserror::Error;
3
4#[derive(Error, Debug, PartialEq)]
5pub enum ContractError {
6 #[error(transparent)]
7 Std(#[from] StdError),
8
9 #[error(transparent)]
10 Handshake(#[from] polytone_evm::handshake::error::HandshakeError),
11
12 #[error("contract is already paired with port ({pair_port}) on connection ({pair_connection}), got port ({suggested_port}) on connection ({suggested_connection})")]
13 AlreadyPaired {
14 suggested_connection: String,
15 suggested_port: String,
16 pair_connection: String,
17 pair_port: String,
18 },
19
20 #[error("contract has no pair, establish a channel with a voice module to create one")]
21 NoPair,
22
23 #[error("ERR_GAS_NEEDED can't be higher then BLOCK_MAX_GAS")]
24 GasLimitsMismatch,
25
26 #[error("channel sequence number overflow, to fix: the contract admin may migrate to close and reopen the channel")]
27 SequenceOverflow,
28}