diff --git a/bindings/nodejs/lib/types/models/api/transaction-failure-reason.ts b/bindings/nodejs/lib/types/models/api/transaction-failure-reason.ts index a5b5934b5a..653df684ec 100644 --- a/bindings/nodejs/lib/types/models/api/transaction-failure-reason.ts +++ b/bindings/nodejs/lib/types/models/api/transaction-failure-reason.ts @@ -33,48 +33,47 @@ export enum TransactionFailureReason { SenderFeatureNotUnlocked = 25, IssuerFeatureNotUnlocked = 26, StakingRewardInputMissing = 27, - StakingBlockIssuerFeatureMissing = 28, - StakingCommitmentInputMissing = 29, - StakingRewardClaimingInvalid = 30, - StakingFeatureRemovedBeforeUnbonding = 31, - StakingFeatureModifiedBeforeUnbonding = 32, - StakingStartEpochInvalid = 33, - StakingEndEpochTooEarly = 34, - BlockIssuerCommitmentInputMissing = 35, - BlockIssuanceCreditInputMissing = 36, - BlockIssuerNotExpired = 37, - BlockIssuerExpiryTooEarly = 38, - ManaMovedOffBlockIssuerAccount = 39, - AccountLocked = 40, - TimelockCommitmentInputMissing = 41, - TimelockNotExpired = 42, - ExpirationCommitmentInputMissing = 43, - ExpirationNotUnlockable = 44, - ReturnAmountNotFulFilled = 45, - NewChainOutputHasNonZeroedId = 46, - ChainOutputImmutableFeaturesChanged = 47, - ImplicitAccountDestructionDisallowed = 48, - MultipleImplicitAccountCreationAddresses = 49, - AccountInvalidFoundryCounter = 50, - AnchorInvalidStateTransition = 51, - AnchorInvalidGovernanceTransition = 52, - FoundryTransitionWithoutAccount = 53, - FoundrySerialInvalid = 54, - DelegationCommitmentInputMissing = 55, - DelegationRewardInputMissing = 56, - DelegationRewardsClaimingInvalid = 57, - DelegationOutputTransitionedTwice = 58, - DelegationModified = 59, - DelegationStartEpochInvalid = 60, - DelegationAmountMismatch = 61, - DelegationEndEpochNotZero = 62, - DelegationEndEpochInvalid = 63, - CapabilitiesNativeTokenBurningNotAllowed = 64, - CapabilitiesManaBurningNotAllowed = 65, - CapabilitiesAccountDestructionNotAllowed = 66, - CapabilitiesAnchorDestructionNotAllowed = 67, - CapabilitiesFoundryDestructionNotAllowed = 68, - CapabilitiesNftDestructionNotAllowed = 69, + StakingCommitmentInputMissing = 28, + StakingRewardClaimingInvalid = 29, + StakingFeatureRemovedBeforeUnbonding = 30, + StakingFeatureModifiedBeforeUnbonding = 31, + StakingStartEpochInvalid = 32, + StakingEndEpochTooEarly = 33, + BlockIssuerCommitmentInputMissing = 34, + BlockIssuanceCreditInputMissing = 35, + BlockIssuerNotExpired = 36, + BlockIssuerExpiryTooEarly = 37, + ManaMovedOffBlockIssuerAccount = 38, + AccountLocked = 39, + TimelockCommitmentInputMissing = 40, + TimelockNotExpired = 41, + ExpirationCommitmentInputMissing = 42, + ExpirationNotUnlockable = 43, + ReturnAmountNotFulFilled = 44, + NewChainOutputHasNonZeroedId = 45, + ChainOutputImmutableFeaturesChanged = 46, + ImplicitAccountDestructionDisallowed = 47, + MultipleImplicitAccountCreationAddresses = 48, + AccountInvalidFoundryCounter = 49, + AnchorInvalidStateTransition = 50, + AnchorInvalidGovernanceTransition = 51, + FoundryTransitionWithoutAccount = 52, + FoundrySerialInvalid = 53, + DelegationCommitmentInputMissing = 54, + DelegationRewardInputMissing = 55, + DelegationRewardsClaimingInvalid = 56, + DelegationOutputTransitionedTwice = 57, + DelegationModified = 58, + DelegationStartEpochInvalid = 59, + DelegationAmountMismatch = 60, + DelegationEndEpochNotZero = 61, + DelegationEndEpochInvalid = 62, + CapabilitiesNativeTokenBurningNotAllowed = 63, + CapabilitiesManaBurningNotAllowed = 64, + CapabilitiesAccountDestructionNotAllowed = 65, + CapabilitiesAnchorDestructionNotAllowed = 66, + CapabilitiesFoundryDestructionNotAllowed = 67, + CapabilitiesNftDestructionNotAllowed = 68, SemanticValidationFailed = 255, } @@ -138,8 +137,6 @@ export const TRANSACTION_FAILURE_REASON_STRINGS: { 'Issuer feature is not unlocked.', [TransactionFailureReason.StakingRewardInputMissing]: 'Staking feature removal or resetting requires a reward input.', - [TransactionFailureReason.StakingBlockIssuerFeatureMissing]: - 'Block issuer feature missing for account with staking feature.', [TransactionFailureReason.StakingCommitmentInputMissing]: 'Staking feature validation requires a commitment input.', [TransactionFailureReason.StakingRewardClaimingInvalid]: diff --git a/bindings/python/iota_sdk/types/transaction_metadata.py b/bindings/python/iota_sdk/types/transaction_metadata.py index 0c6d628678..d7928d0e98 100644 --- a/bindings/python/iota_sdk/types/transaction_metadata.py +++ b/bindings/python/iota_sdk/types/transaction_metadata.py @@ -52,48 +52,47 @@ class TransactionFailureReason(Enum): SenderFeatureNotUnlocked = 25 IssuerFeatureNotUnlocked = 26 StakingRewardInputMissing = 27 - StakingBlockIssuerFeatureMissing = 28 - StakingCommitmentInputMissing = 29 - StakingRewardClaimingInvalid = 30 - StakingFeatureRemovedBeforeUnbonding = 31 - StakingFeatureModifiedBeforeUnbonding = 32 - StakingStartEpochInvalid = 33 - StakingEndEpochTooEarly = 34 - BlockIssuerCommitmentInputMissing = 35 - BlockIssuanceCreditInputMissing = 36 - BlockIssuerNotExpired = 37 - BlockIssuerExpiryTooEarly = 38 - ManaMovedOffBlockIssuerAccount = 39 - AccountLocked = 40 - TimelockCommitmentInputMissing = 41 - TimelockNotExpired = 42 - ExpirationCommitmentInputMissing = 43 - ExpirationNotUnlockable = 44 - ReturnAmountNotFulFilled = 45 - NewChainOutputHasNonZeroedId = 46 - ChainOutputImmutableFeaturesChanged = 47 - ImplicitAccountDestructionDisallowed = 48 - MultipleImplicitAccountCreationAddresses = 49 - AccountInvalidFoundryCounter = 50 - AnchorInvalidStateTransition = 51 - AnchorInvalidGovernanceTransition = 52 - FoundryTransitionWithoutAccount = 53 - FoundrySerialInvalid = 54 - DelegationCommitmentInputMissing = 55 - DelegationRewardInputMissing = 56 - DelegationRewardsClaimingInvalid = 57 - DelegationOutputTransitionedTwice = 58 - DelegationModified = 59 - DelegationStartEpochInvalid = 60 - DelegationAmountMismatch = 61 - DelegationEndEpochNotZero = 62 - DelegationEndEpochInvalid = 63 - CapabilitiesNativeTokenBurningNotAllowed = 64 - CapabilitiesManaBurningNotAllowed = 65 - CapabilitiesAccountDestructionNotAllowed = 66 - CapabilitiesAnchorDestructionNotAllowed = 67 - CapabilitiesFoundryDestructionNotAllowed = 68 - CapabilitiesNftDestructionNotAllowed = 69 + StakingCommitmentInputMissing = 28 + StakingRewardClaimingInvalid = 29 + StakingFeatureRemovedBeforeUnbonding = 30 + StakingFeatureModifiedBeforeUnbonding = 31 + StakingStartEpochInvalid = 32 + StakingEndEpochTooEarly = 33 + BlockIssuerCommitmentInputMissing = 34 + BlockIssuanceCreditInputMissing = 35 + BlockIssuerNotExpired = 36 + BlockIssuerExpiryTooEarly = 37 + ManaMovedOffBlockIssuerAccount = 38 + AccountLocked = 39 + TimelockCommitmentInputMissing = 40 + TimelockNotExpired = 41 + ExpirationCommitmentInputMissing = 42 + ExpirationNotUnlockable = 43 + ReturnAmountNotFulFilled = 44 + NewChainOutputHasNonZeroedId = 45 + ChainOutputImmutableFeaturesChanged = 46 + ImplicitAccountDestructionDisallowed = 47 + MultipleImplicitAccountCreationAddresses = 48 + AccountInvalidFoundryCounter = 49 + AnchorInvalidStateTransition = 50 + AnchorInvalidGovernanceTransition = 51 + FoundryTransitionWithoutAccount = 52 + FoundrySerialInvalid = 53 + DelegationCommitmentInputMissing = 54 + DelegationRewardInputMissing = 54 + DelegationRewardsClaimingInvalid = 56 + DelegationOutputTransitionedTwice = 57 + DelegationModified = 58 + DelegationStartEpochInvalid = 59 + DelegationAmountMismatch = 60 + DelegationEndEpochNotZero = 61 + DelegationEndEpochInvalid = 62 + CapabilitiesNativeTokenBurningNotAllowed = 63 + CapabilitiesManaBurningNotAllowed = 64 + CapabilitiesAccountDestructionNotAllowed = 65 + CapabilitiesAnchorDestructionNotAllowed = 66 + CapabilitiesFoundryDestructionNotAllowed = 67 + CapabilitiesNftDestructionNotAllowed = 68 SemanticValidationFailed = 255 def __str__(self): @@ -106,7 +105,7 @@ def __str__(self): 5: "Invalid unlock for chain address.", 6: "Invalid unlock for direct unlockable address.", 7: "Invalid unlock for multi address.", - 8: "Commitment input required with reward or BIC input.", + 8: "Commitment input references an invalid or non-existent commitment.", 9: "BIC input reference cannot be loaded.", 10: "Reward input does not reference a staking account or a delegation output.", 11: "Staking rewards could not be calculated due to storage issues or overflow.", @@ -117,56 +116,55 @@ def __str__(self): 16: "Mana decay creation slot/epoch index exceeds target slot/epoch index.", 17: "Native token sums are unbalanced.", 18: "Simple token scheme minted/melted value decreased.", - 19: "Simple token scheme minting invalid.", - 20: "Simple token scheme melting invalid.", - 21: "Simple token scheme maximum supply changed.", - 22: "Simple token scheme genesis invalid.", + 19: "Simple token scheme's minted tokens did not increase by the minted amount or melted tokens changed.", + 20: "Simple token scheme's melted tokens did not increase by the melted amount or minted tokens changed.", + 21: "Simple token scheme's maximum supply cannot change during transition.", + 22: "Newly created simple token scheme's melted tokens are not zero or minted tokens do not equal native token amount in transaction.", 23: "Multi address length and multi unlock length do not match.", 24: "Multi address unlock threshold not reached.", 25: "Sender feature is not unlocked.", 26: "Issuer feature is not unlocked.", 27: "Staking feature removal or resetting requires a reward input.", - 28: "Block issuer feature missing for account with staking feature.", - 29: "Staking feature validation requires a commitment input.", - 30: "Staking feature must be removed or reset in order to claim rewards.", - 31: "Staking feature can only be removed after the unbonding period.", - 32: "Staking start epoch, fixed cost and staked amount cannot be modified while bonded.", - 33: "Staking start epoch must be the epoch of the transaction.", - 34: "Staking end epoch must be set to the transaction epoch plus the unbonding period.", - 35: "Commitment input missing for block issuer feature.", - 36: "Block issuance credit input missing for account with block issuer feature.", - 37: "Block issuer feature has not expired.", - 38: "Block issuer feature expiry set too early.", - 39: "Mana cannot be moved off block issuer accounts except with manalocks.", - 40: "Account is locked due to negative block issuance credits.", - 41: "Transaction's containing a timelock condition require a commitment input.", - 42: "Timelock not expired.", - 43: "Transaction's containing an expiration condition require a commitment input.", - 44: "Expiration unlock condition cannot be unlocked.", - 45: "Return amount not fulfilled.", - 46: "New chain output has non-zeroed ID.", - 47: "Immutable features in chain output modified during transition.", - 48: "Cannot destroy implicit account; must be transitioned to account.", - 49: "Multiple implicit account creation addresses on the input side.", - 50: "Foundry counter in account decreased or did not increase by the number of new foundries.", - 51: "Anchor has an invalid state transition.", - 52: "Anchor has an invalid governance transition.", - 53: "Foundry output transitioned without accompanying account on input or output side.", - 54: "Foundry output serial number is invalid.", - 55: "Delegation output validation requires a commitment input.", - 56: "Delegation output cannot be destroyed without a reward input.", - 57: "Invalid delegation mana rewards claiming.", - 58: "Delegation output attempted to be transitioned twice.", - 59: "Delegated amount, validator ID and start epoch cannot be modified.", - 60: "Invalid start epoch.", - 61: "Delegated amount does not match amount.", - 62: "End epoch must be set to zero at output genesis.", - 63: "Delegation end epoch does not match current epoch.", - 64: "Native token burning is not allowed by the transaction capabilities.", - 65: "Mana burning is not allowed by the transaction capabilities.", - 66: "Account destruction is not allowed by the transaction capabilities.", - 67: "Anchor destruction is not allowed by the transaction capabilities.", - 68: "Foundry destruction is not allowed by the transaction capabilities.", - 69: "NFT destruction is not allowed by the transaction capabilities.", + 28: "Staking feature validation requires a commitment input.", + 29: "Staking feature must be removed or reset in order to claim rewards.", + 30: "Staking feature can only be removed after the unbonding period.", + 31: "Staking start epoch, fixed cost and staked amount cannot be modified while bonded.", + 32: "Staking start epoch must be the epoch of the transaction.", + 33: "Staking end epoch must be set to the transaction epoch plus the unbonding period.", + 34: "Commitment input missing for block issuer feature.", + 35: "Block issuance credit input missing for account with block issuer feature.", + 36: "Block issuer feature has not expired.", + 37: "Block issuer feature expiry set too early.", + 38: "Mana cannot be moved off block issuer accounts except with manalocks.", + 39: "Account is locked due to negative block issuance credits.", + 40: "Transaction's containing a timelock condition require a commitment input.", + 41: "Timelock not expired.", + 42: "Transaction's containing an expiration condition require a commitment input.", + 43: "Expiration unlock condition cannot be unlocked.", + 44: "Return amount not fulfilled.", + 45: "New chain output has non-zeroed ID.", + 46: "Immutable features in chain output modified during transition.", + 47: "Cannot destroy implicit account; must be transitioned to account.", + 48: "Multiple implicit account creation addresses on the input side.", + 49: "Foundry counter in account decreased or did not increase by the number of new foundries.", + 50: "Anchor has an invalid state transition.", + 51: "Anchor has an invalid governance transition.", + 52: "Foundry output transitioned without accompanying account on input or output side.", + 53: "Foundry output serial number is invalid.", + 54: "Delegation output validation requires a commitment input.", + 55: "Delegation output cannot be destroyed without a reward input.", + 56: "Invalid delegation mana rewards claiming.", + 57: "Delegation output attempted to be transitioned twice.", + 58: "Delegated amount, validator ID and start epoch cannot be modified.", + 59: "Invalid start epoch.", + 60: "Delegated amount does not match amount.", + 61: "End epoch must be set to zero at output genesis.", + 62: "Delegation end epoch does not match current epoch.", + 63: "Native token burning is not allowed by the transaction capabilities.", + 64: "Mana burning is not allowed by the transaction capabilities.", + 65: "Account destruction is not allowed by the transaction capabilities.", + 66: "Anchor destruction is not allowed by the transaction capabilities.", + 67: "Foundry destruction is not allowed by the transaction capabilities.", + 68: "NFT destruction is not allowed by the transaction capabilities.", 255: "Semantic validation failed.", }[self.value] diff --git a/sdk/src/types/block/output/account.rs b/sdk/src/types/block/output/account.rs index c386d42123..e3b22d7af1 100644 --- a/sdk/src/types/block/output/account.rs +++ b/sdk/src/types/block/output/account.rs @@ -13,7 +13,7 @@ use packable::{ use crate::types::block::{ address::{AccountAddress, Address}, output::{ - feature::{verify_allowed_features, Feature, FeatureFlags, Features}, + feature::{verify_allowed_features, Feature, FeatureError, FeatureFlags, Features}, unlock_condition::{ verify_allowed_unlock_conditions, verify_restricted_addresses, UnlockCondition, UnlockConditionFlags, UnlockConditions, @@ -259,7 +259,7 @@ impl AccountOutputBuilder { OutputBuilderAmount::MinimumAmount(params) => output.minimum_amount(params), }; - verify_staked_amount(output.amount, &output.features)?; + verify_staking(output.amount, &output.features)?; Ok(output) } @@ -511,7 +511,7 @@ impl Packable for AccountOutput { verify_allowed_features(&features, Self::ALLOWED_FEATURES) .map_err(UnpackError::Packable) .coerce()?; - verify_staked_amount(amount, &features).map_err(UnpackError::Packable)?; + verify_staking(amount, &features).map_err(UnpackError::Packable)?; } let immutable_features = Features::unpack_inner(unpacker, visitor).coerce()?; @@ -560,8 +560,11 @@ fn verify_unlock_conditions(unlock_conditions: &UnlockConditions, account_id: &A )?) } -fn verify_staked_amount(amount: u64, features: &Features) -> Result<(), OutputError> { +fn verify_staking(amount: u64, features: &Features) -> Result<(), OutputError> { if let Some(staking) = features.staking() { + if features.block_issuer().is_none() { + return Err(FeatureError::StakingBlockIssuerMissing)?; + } if amount < staking.staked_amount() { return Err(OutputError::InvalidStakedAmount); } diff --git a/sdk/src/types/block/output/feature/error.rs b/sdk/src/types/block/output/feature/error.rs index 6e041fc356..f340d55766 100644 --- a/sdk/src/types/block/output/feature/error.rs +++ b/sdk/src/types/block/output/feature/error.rs @@ -44,6 +44,8 @@ pub enum FeatureError { InvalidBlockIssuerKeyCount(>::Error), #[display(fmt = "block issuer keys are not unique and/or sorted")] BlockIssuerKeysNotUniqueSorted, + #[display(fmt = "block issuer feature missing for account with staking feature")] + StakingBlockIssuerMissing, #[from] NativeToken(NativeTokenError), #[from] diff --git a/sdk/src/types/block/semantic/error.rs b/sdk/src/types/block/semantic/error.rs index c9d13ab0d7..a9ac1ba4a8 100644 --- a/sdk/src/types/block/semantic/error.rs +++ b/sdk/src/types/block/semantic/error.rs @@ -98,90 +98,88 @@ pub enum TransactionFailureReason { IssuerFeatureNotUnlocked = 26, #[display(fmt = "staking feature removal or resetting requires a reward input")] StakingRewardInputMissing = 27, - #[display(fmt = "block issuer feature missing for account with staking feature")] - StakingBlockIssuerFeatureMissing = 28, #[display(fmt = "staking feature validation requires a commitment input")] - StakingCommitmentInputMissing = 29, + StakingCommitmentInputMissing = 28, #[display(fmt = "staking feature must be removed or reset in order to claim rewards")] - StakingRewardClaimingInvalid = 30, + StakingRewardClaimingInvalid = 29, #[display(fmt = "staking feature can only be removed after the unbonding period")] - StakingFeatureRemovedBeforeUnbonding = 31, + StakingFeatureRemovedBeforeUnbonding = 30, #[display(fmt = "staking start epoch, fixed cost and staked amount cannot be modified while bonded")] - StakingFeatureModifiedBeforeUnbonding = 32, + StakingFeatureModifiedBeforeUnbonding = 31, #[display(fmt = "staking start epoch must be the epoch of the transaction")] - StakingStartEpochInvalid = 33, + StakingStartEpochInvalid = 32, #[display(fmt = "staking end epoch must be set to the transaction epoch plus the unbonding period")] - StakingEndEpochTooEarly = 34, + StakingEndEpochTooEarly = 33, #[display(fmt = "commitment input missing for block issuer feature")] - BlockIssuerCommitmentInputMissing = 35, + BlockIssuerCommitmentInputMissing = 34, #[display(fmt = "block issuance credit input missing for account with block issuer feature")] - BlockIssuanceCreditInputMissing = 36, + BlockIssuanceCreditInputMissing = 35, #[display(fmt = "block issuer feature has not expired")] - BlockIssuerNotExpired = 37, + BlockIssuerNotExpired = 36, #[display(fmt = "block issuer feature expiry set too early")] - BlockIssuerExpiryTooEarly = 38, + BlockIssuerExpiryTooEarly = 37, #[display(fmt = "mana cannot be moved off block issuer accounts except with manalocks")] - ManaMovedOffBlockIssuerAccount = 39, + ManaMovedOffBlockIssuerAccount = 38, #[display(fmt = "account is locked due to negative block issuance credits")] - AccountLocked = 40, + AccountLocked = 39, #[display(fmt = "transaction's containing a timelock condition require a commitment input")] - TimelockCommitmentInputMissing = 41, + TimelockCommitmentInputMissing = 40, #[display(fmt = "timelock not expired")] - TimelockNotExpired = 42, + TimelockNotExpired = 41, #[display(fmt = "transaction's containing an expiration condition require a commitment input")] - ExpirationCommitmentInputMissing = 43, + ExpirationCommitmentInputMissing = 42, #[display(fmt = "expiration unlock condition cannot be unlocked")] - ExpirationNotUnlockable = 44, + ExpirationNotUnlockable = 43, #[display(fmt = "return amount not fulfilled")] - ReturnAmountNotFulFilled = 45, + ReturnAmountNotFulFilled = 44, #[display(fmt = "new chain output has non-zeroed ID")] - NewChainOutputHasNonZeroedId = 46, + NewChainOutputHasNonZeroedId = 45, #[display(fmt = "immutable features in chain output modified during transition")] - ChainOutputImmutableFeaturesChanged = 47, + ChainOutputImmutableFeaturesChanged = 46, #[display(fmt = "cannot destroy implicit account; must be transitioned to account")] - ImplicitAccountDestructionDisallowed = 48, + ImplicitAccountDestructionDisallowed = 47, #[display(fmt = "multiple implicit account creation addresses on the input side")] - MultipleImplicitAccountCreationAddresses = 49, + MultipleImplicitAccountCreationAddresses = 48, #[display(fmt = "foundry counter in account decreased or did not increase by the number of new foundries")] - AccountInvalidFoundryCounter = 50, + AccountInvalidFoundryCounter = 49, #[display(fmt = "invalid anchor state transition")] - AnchorInvalidStateTransition = 51, + AnchorInvalidStateTransition = 50, #[display(fmt = "invalid anchor governance transition")] - AnchorInvalidGovernanceTransition = 52, + AnchorInvalidGovernanceTransition = 51, #[display(fmt = "foundry output transitioned without accompanying account on input or output side")] - FoundryTransitionWithoutAccount = 53, + FoundryTransitionWithoutAccount = 52, #[display(fmt = "foundry output serial number is invalid")] - FoundrySerialInvalid = 54, + FoundrySerialInvalid = 53, #[display(fmt = "delegation output validation requires a commitment input")] - DelegationCommitmentInputMissing = 55, + DelegationCommitmentInputMissing = 54, #[display(fmt = "delegation output cannot be destroyed without a reward input")] - DelegationRewardInputMissing = 56, + DelegationRewardInputMissing = 55, #[display(fmt = "invalid delegation mana rewards claiming")] - DelegationRewardsClaimingInvalid = 57, + DelegationRewardsClaimingInvalid = 56, #[display(fmt = "attempted to transition delegation output twice")] - DelegationOutputTransitionedTwice = 58, + DelegationOutputTransitionedTwice = 57, #[display(fmt = "delegated amount, validator ID and start epoch cannot be modified")] - DelegationModified = 59, + DelegationModified = 58, #[display(fmt = "delegation output has invalid start epoch")] - DelegationStartEpochInvalid = 60, + DelegationStartEpochInvalid = 59, #[display(fmt = "delegated amount does not match amount")] - DelegationAmountMismatch = 61, + DelegationAmountMismatch = 60, #[display(fmt = "end epoch must be set to zero at output genesis")] - DelegationEndEpochNotZero = 62, + DelegationEndEpochNotZero = 61, #[display(fmt = "delegation end epoch does not match current epoch")] - DelegationEndEpochInvalid = 63, + DelegationEndEpochInvalid = 62, #[display(fmt = "native token burning is not allowed by the transaction capabilities")] - CapabilitiesNativeTokenBurningNotAllowed = 64, + CapabilitiesNativeTokenBurningNotAllowed = 63, #[display(fmt = "mana burning is not allowed by the transaction capabilities")] - CapabilitiesManaBurningNotAllowed = 65, + CapabilitiesManaBurningNotAllowed = 64, #[display(fmt = "account destruction is not allowed by the transaction capabilities")] - CapabilitiesAccountDestructionNotAllowed = 66, + CapabilitiesAccountDestructionNotAllowed = 65, #[display(fmt = "anchor destruction is not allowed by the transaction capabilities")] - CapabilitiesAnchorDestructionNotAllowed = 67, + CapabilitiesAnchorDestructionNotAllowed = 66, #[display(fmt = "foundry destruction is not allowed by the transaction capabilities")] - CapabilitiesFoundryDestructionNotAllowed = 68, + CapabilitiesFoundryDestructionNotAllowed = 67, #[display(fmt = "NFT destruction is not allowed by the transaction capabilities")] - CapabilitiesNftDestructionNotAllowed = 69, + CapabilitiesNftDestructionNotAllowed = 68, #[display(fmt = "semantic validation failed")] SemanticValidationFailed = 255, } diff --git a/sdk/src/types/block/semantic/mod.rs b/sdk/src/types/block/semantic/mod.rs index f3f02fb28b..89f04c5f91 100644 --- a/sdk/src/types/block/semantic/mod.rs +++ b/sdk/src/types/block/semantic/mod.rs @@ -314,11 +314,6 @@ impl<'a> SemanticValidationContext<'a> { .ok_or(TransactionFailureReason::ManaOverflow)?; } } - if output.features().staking().is_some() { - if output.features().block_issuer().is_none() { - return Err(TransactionFailureReason::StakingBlockIssuerFeatureMissing); - } - } (output.amount(), output.mana(), None, Some(output.features())) }