Skip to content

Commit

Permalink
Use const for MAX_COMMANDS
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Oct 24, 2024
1 parent 6bd7eb1 commit 353e925
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bridges/snowbridge/primitives/core/src/outbound/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ sol! {
}
}

pub const MAX_COMMANDS: u32 = 8;

/// A message which can be accepted by implementations of `/[`SendMessage`\]`
#[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug)]
#[cfg_attr(feature = "std", derive(PartialEq))]
Expand All @@ -101,7 +103,7 @@ pub struct Message {
/// Fee
pub fee: u128,
/// Commands
pub commands: BoundedVec<Command, ConstU32<5>>,
pub commands: BoundedVec<Command, ConstU32<MAX_COMMANDS>>,
}

/// A command which is executable by the Gateway contract on Ethereum
Expand Down

0 comments on commit 353e925

Please sign in to comment.