Skip to content

Commit

Permalink
Add new SDK error types
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed Oct 9, 2023
1 parent c53abb2 commit 164b21e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions shared/src/sdk/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use namada_core::proto::Tx;
use namada_core::types::address::Address;
use namada_core::types::dec::Dec;
use namada_core::types::ethereum_events::EthAddress;
use namada_core::types::storage;
use namada_core::types::storage::Epoch;
use prost::EncodeError;
Expand Down Expand Up @@ -328,6 +329,18 @@ pub enum EthereumBridgeError {
/// Invalid Bridge pool nonce error.
#[error("The Bridge pool nonce is invalid")]
InvalidBpNonce,
/// Invalid fee token error.
#[error("An invalid fee token was provided: {0}")]
InvalidFeeToken(Address),
/// Not whitelisted error.
#[error("ERC20 is not whitelisted: {0}")]
Erc20NotWhitelisted(EthAddress),
/// Exceeded token caps error.
#[error("ERC20 token caps exceeded: {0}")]
Erc20TokenCapsExceeded(EthAddress),
/// Transfer already in pool error.
#[error("An identical transfer is already present in the Bridge pool")]
TransferAlreadyInPool,
}

/// Checks if the given error is an invalid viewing key
Expand Down

0 comments on commit 164b21e

Please sign in to comment.