Skip to content

Commit

Permalink
Merge branch '2.0' into feat/automatic-mana-allotment
Browse files Browse the repository at this point in the history
  • Loading branch information
DaughterOfMars authored Feb 15, 2024
2 parents 2a0efbf + 9db1a88 commit f193e12
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 13 additions & 1 deletion sdk/src/types/api/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,20 @@ pub enum TransactionState {
}

/// Describes the reason of a block failure.
#[derive(Clone, Copy, Debug, Eq, PartialEq, serde_repr::Serialize_repr, serde_repr::Deserialize_repr)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
strum::FromRepr,
strum::EnumString,
strum::AsRefStr,
)]
#[serde(rename_all = "camelCase")]
#[strum(serialize_all = "camelCase")]
#[non_exhaustive]
#[repr(u8)]
pub enum BlockFailureReason {
Expand Down
5 changes: 4 additions & 1 deletion sdk/src/types/block/semantic/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ use crate::types::block::Error;

/// Describes the reason of a transaction failure.
#[repr(u8)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, packable::Packable, strum::FromRepr)]
#[derive(
Debug, Copy, Clone, Eq, PartialEq, packable::Packable, strum::FromRepr, strum::EnumString, strum::AsRefStr,
)]
#[cfg_attr(feature = "serde", derive(serde_repr::Serialize_repr, serde_repr::Deserialize_repr))]
#[strum(serialize_all = "camelCase")]
#[packable(unpack_error = Error)]
#[packable(tag_type = u8, with_error = Error::InvalidTransactionFailureReason)]
#[non_exhaustive]
Expand Down

0 comments on commit f193e12

Please sign in to comment.