pub enum BridgeError {
Show 43 variants
NotInitialized = 1,
AlreadyInitialized = 2,
InvalidAmount = 3,
FeeTooHigh = 4,
MismatchedArrays = 5,
ContractPaused = 6,
AddressBlocked = 7,
AddressNotAllowlisted = 8,
InsufficientReclaimable = 9,
AssetNotWhitelisted = 10,
DailyLimitExceeded = 11,
DuplicateNonce = 12,
TransactionExpired = 13,
LoyaltyTokenNotSet = 14,
ReplayedNonce = 15,
NotRelayer = 16,
BelowThreshold = 17,
ThresholdExceedsRelayers = 18,
TimelockNotFound = 19,
TimelockNotMatured = 20,
InvalidReleaseTime = 21,
Unauthorized = 22,
AuthNonceAlreadyUsed = 23,
AuthNonceExpired = 24,
UpgradeNotScheduled = 25,
UpgradeHashMismatch = 26,
UpgradeTimelockActive = 27,
WithdrawExceedsLimit = 28,
Overflow = 29,
CommitmentNotFound = 30,
CommitmentAlreadyRevealed = 31,
CommitmentExpired = 32,
CommitmentHashMismatch = 33,
CommitmentNotMatured = 34,
SlippageExceeded = 35,
SwapFailed = 36,
MetaTxInvalidSignature = 37,
MetaTxExpired = 38,
MetaTxNonceAlreadyUsed = 39,
ContractDeactivated = 40,
DuplicateRelayerSignature = 41,
PoolNotWhitelisted = 42,
MultiHopNotSupported = 43,
}Expand description
All error codes that the contract may return.
Every public function that can fail returns Result<_, BridgeError>.
Callers should match on these variants to distinguish recoverable from
unrecoverable conditions.
Variants§
NotInitialized = 1
Contract has not been initialized yet. Call initialize first.
AlreadyInitialized = 2
initialize was called on an already-initialized contract.
InvalidAmount = 3
A token amount was zero or negative where a positive value is required.
FeeTooHigh = 4
The requested fee in basis points exceeds MAX_FEE_BPS (1 000).
MismatchedArrays = 5
The targets and amounts arrays passed to batch_fund_c_address have
different lengths.
ContractPaused = 6
A mutating operation was attempted while the contract is paused.
AddressBlocked = 7
The target address has been added to the blocklist.
AddressNotAllowlisted = 8
The contract is in allowlist mode and the target address is not allowlisted.
InsufficientReclaimable = 9
The requested withdrawal or reclaim amount exceeds the available balance.
AssetNotWhitelisted = 10
The asset is not on the whitelist. Add it with add_asset first.
DailyLimitExceeded = 11
The source address has exceeded its configured daily transfer limit.
DuplicateNonce = 12
The supplied sequential nonce does not match the stored value.
TransactionExpired = 13
The transaction deadline has passed.
LoyaltyTokenNotSet = 14
No loyalty token has been configured. Call set_loyalty_token first.
ReplayedNonce = 15
A cross-chain (chain_id, tx_hash) pair has already been processed.
NotRelayer = 16
A signature was supplied by a public key that is not a registered relayer.
BelowThreshold = 17
The number of valid relayer signatures is below the required threshold.
ThresholdExceedsRelayers = 18
The threshold would exceed the total number of registered relayers.
TimelockNotFound = 19
No timelock entry exists for the given ID.
TimelockNotMatured = 20
The timelock’s release_time has not been reached yet.
InvalidReleaseTime = 21
release_time is in the past, or cliff_time is after release_time.
The caller is not authorized to perform this action (e.g. double-claim).
AuthNonceAlreadyUsed = 23
The auth-entry nonce supplied to verify_auth_entry has already been used.
AuthNonceExpired = 24
The current ledger sequence is outside the [valid_after, valid_before) window.
UpgradeNotScheduled = 25
execute_upgrade was called but no upgrade has been scheduled.
UpgradeHashMismatch = 26
The expected_hash passed to execute_upgrade does not match the scheduled hash.
UpgradeTimelockActive = 27
The scheduled upgrade’s timelock period has not yet elapsed.
WithdrawExceedsLimit = 28
Overflow = 29
An arithmetic operation overflowed i128 bounds.
CommitmentNotFound = 30
No commitment exists for the given ID.
CommitmentAlreadyRevealed = 31
The commitment has already been revealed.
CommitmentExpired = 32
The reveal deadline has passed.
CommitmentHashMismatch = 33
The revealed amount+nonce does not match the stored hash.
CommitmentNotMatured = 34
The minimum delay between commit and reveal has not elapsed.
SlippageExceeded = 35
The swap produced fewer target tokens than min_target_amount.
SwapFailed = 36
A DEX pool in the swap route returned zero or failed.
MetaTxInvalidSignature = 37
The meta-transaction signature is malformed or does not match the expected signer.
MetaTxExpired = 38
The meta-transaction deadline has passed (funds not yet submitted on-chain).
MetaTxNonceAlreadyUsed = 39
This meta-transaction nonce has already been used; replay prevented.
ContractDeactivated = 40
The contract is deactivated (permanently paused/migrated).
DuplicateRelayerSignature = 41
The same relayer pubkey appeared more than once in sigs.
PoolNotWhitelisted = 42
A pool address in swap_route is not on the swap-pool whitelist.
MultiHopNotSupported = 43
swap_route contained more than one hop; multi-hop swaps are not supported.
Implementations§
Trait Implementations§
Source§impl Clone for BridgeError
impl Clone for BridgeError
Source§fn clone(&self) -> BridgeError
fn clone(&self) -> BridgeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BridgeError
impl Debug for BridgeError
Source§impl From<&BridgeError> for Error
impl From<&BridgeError> for Error
Source§fn from(val: &BridgeError) -> Error
fn from(val: &BridgeError) -> Error
Source§impl From<&BridgeError> for InvokeError
impl From<&BridgeError> for InvokeError
Source§fn from(val: &BridgeError) -> InvokeError
fn from(val: &BridgeError) -> InvokeError
Source§impl From<BridgeError> for Error
impl From<BridgeError> for Error
Source§fn from(val: BridgeError) -> Error
fn from(val: BridgeError) -> Error
Source§impl From<BridgeError> for InvokeError
impl From<BridgeError> for InvokeError
Source§fn from(val: BridgeError) -> InvokeError
fn from(val: BridgeError) -> InvokeError
Source§impl PartialEq for BridgeError
impl PartialEq for BridgeError
Source§fn eq(&self, other: &BridgeError) -> bool
fn eq(&self, other: &BridgeError) -> bool
self and other values to be equal, and is used by ==.Source§impl TryFrom<&Error> for BridgeError
impl TryFrom<&Error> for BridgeError
Source§impl TryFrom<&InvokeError> for BridgeError
impl TryFrom<&InvokeError> for BridgeError
Source§impl TryFrom<Error> for BridgeError
impl TryFrom<Error> for BridgeError
Source§impl TryFrom<InvokeError> for BridgeError
impl TryFrom<InvokeError> for BridgeError
Source§impl TryFromVal<Env, BridgeError> for Val
impl TryFromVal<Env, BridgeError> for Val
type Error = ConversionError
fn try_from_val(env: &Env, val: &BridgeError) -> Result<Self, ConversionError>
Source§impl TryFromVal<Env, Val> for BridgeError
impl TryFromVal<Env, Val> for BridgeError
impl Copy for BridgeError
impl Eq for BridgeError
impl StructuralPartialEq for BridgeError
Auto Trait Implementations§
impl Freeze for BridgeError
impl RefUnwindSafe for BridgeError
impl Send for BridgeError
impl Sync for BridgeError
impl Unpin for BridgeError
impl UnsafeUnpin for BridgeError
impl UnwindSafe for BridgeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
impl<T, U, V, E, C> Compare<(T, U, V)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,
§impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W>,
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W>,
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W> + Compare<X>,
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for Cwhere
C: Compare<T, Error = E, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W> + Compare<X>,
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FromXdr for Twhere
T: TryFromVal<Env, Val>,
impl<T> FromXdr for Twhere
T: TryFromVal<Env, Val>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more