evm_note/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use cosmwasm_std::StdError;
use thiserror::Error;

#[derive(Error, Debug, PartialEq)]
pub enum ContractError {
    #[error(transparent)]
    Std(#[from] StdError),

    #[error(transparent)]
    Handshake(#[from] polytone_evm::handshake::error::HandshakeError),

    #[error("contract is already paired with port ({pair_port}) on connection ({pair_connection}), got port ({suggested_port}) on connection ({suggested_connection})")]
    AlreadyPaired {
        suggested_connection: String,
        suggested_port: String,
        pair_connection: String,
        pair_port: String,
    },

    #[error("contract has no pair, establish a channel with a voice module to create one")]
    NoPair,

    #[error("ERR_GAS_NEEDED can't be higher then BLOCK_MAX_GAS")]
    GasLimitsMismatch,

    #[error("channel sequence number overflow, to fix: the contract admin may migrate to close and reopen the channel")]
    SequenceOverflow,
}