radix_transactions/manifest/static_resource_movements/
error.rs1use super::*;
2use crate::manifest::ManifestValidationError;
3use radix_common::prelude::*;
4
5#[derive(Clone, Debug, PartialEq, Eq)]
6pub enum StaticResourceMovementsError {
7 DecimalAmountIsNegative,
8 BoundsInvalidForResourceKind,
9 ConstraintBoundsInvalid,
10 AssertionCannotBeSatisfied,
11 TakeCannotBeSatisfied,
12 DecimalOverflow,
13 DuplicateNonFungibleId,
14 WorktopEndsWithKnownResourcesPresent,
15 ManifestValidationError(ManifestValidationError),
16 NotAResourceAddress(GlobalAddress),
17 TypedManifestNativeInvocationError(TypedManifestNativeInvocationError),
18 AggregatedBalanceChangeWithdrawDoesNotSupportUnknownResources,
19 UnexpectedBoundsForNetWithdraw,
20}
21
22impl From<ManifestValidationError> for StaticResourceMovementsError {
23 fn from(value: ManifestValidationError) -> Self {
24 Self::ManifestValidationError(value)
25 }
26}
27
28impl From<BoundAdjustmentError> for StaticResourceMovementsError {
29 fn from(value: BoundAdjustmentError) -> Self {
30 match value {
31 BoundAdjustmentError::DecimalOverflow => StaticResourceMovementsError::DecimalOverflow,
32 BoundAdjustmentError::TakeCannotBeSatisfied => {
33 StaticResourceMovementsError::TakeCannotBeSatisfied
34 }
35 }
36 }
37}
38
39impl From<TypedManifestNativeInvocationError> for StaticResourceMovementsError {
40 fn from(value: TypedManifestNativeInvocationError) -> Self {
41 Self::TypedManifestNativeInvocationError(value)
42 }
43}