diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs b/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs index 8e47dba4ef42..ab6452931570 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs +++ b/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs @@ -16,7 +16,7 @@ use snowbridge_core::{ meth, outbound::v2::*, pricing::{PricingParameters, Rewards}, - primary_governance_origin, ParaId, + ParaId, }; use sp_core::{ConstU32, H160, H256}; use sp_runtime::{ diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/src/send_message_impl.rs b/bridges/snowbridge/pallets/outbound-queue-v2/src/send_message_impl.rs index 0abe5cba14e6..7c75005e5526 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/src/send_message_impl.rs +++ b/bridges/snowbridge/pallets/outbound-queue-v2/src/send_message_impl.rs @@ -8,9 +8,8 @@ use frame_support::{ ensure, traits::{EnqueueMessage, Get}, }; -use snowbridge_core::{ - outbound::v2::{Message, SendError, SendMessage, SendMessageFeeProvider}, - primary_governance_origin, +use snowbridge_core::outbound::v2::{ + primary_governance_origin, Message, SendError, SendMessage, SendMessageFeeProvider, }; use sp_core::H256; use sp_runtime::BoundedVec; diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/src/test.rs b/bridges/snowbridge/pallets/outbound-queue-v2/src/test.rs index e4d942a08912..f982a3b83baf 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/src/test.rs +++ b/bridges/snowbridge/pallets/outbound-queue-v2/src/test.rs @@ -11,8 +11,8 @@ use frame_support::{ use codec::Encode; use snowbridge_core::{ - outbound::v2::{Command, SendError, SendMessage}, - primary_governance_origin, ChannelId, ParaId, + outbound::v2::{primary_governance_origin, Command, SendError, SendMessage}, + ChannelId, ParaId, }; use sp_core::H256; diff --git a/bridges/snowbridge/primitives/core/src/lib.rs b/bridges/snowbridge/primitives/core/src/lib.rs index ae1c56f978bf..7ad129a52542 100644 --- a/bridges/snowbridge/primitives/core/src/lib.rs +++ b/bridges/snowbridge/primitives/core/src/lib.rs @@ -172,13 +172,3 @@ impl Default for AssetMetadata { /// Maximum length of a string field in ERC20 token metada const METADATA_FIELD_MAX_LEN: u32 = 32; - -// Origin for high-priority governance commands -pub fn primary_governance_origin() -> H256 { - hex!("0000000000000000000000000000000000000000000000000000000000000001").into() -} - -// Origin for lower-priority governance commands -pub fn second_governance_origin() -> H256 { - hex!("0000000000000000000000000000000000000000000000000000000000000002").into() -} diff --git a/bridges/snowbridge/primitives/core/src/outbound/v2.rs b/bridges/snowbridge/primitives/core/src/outbound/v2.rs index 1ceea4c597cb..1fa56bef6b82 100644 --- a/bridges/snowbridge/primitives/core/src/outbound/v2.rs +++ b/bridges/snowbridge/primitives/core/src/outbound/v2.rs @@ -6,6 +6,7 @@ use crate::outbound::OperatingMode; use codec::{Decode, Encode}; use ethabi::Token; use frame_support::{pallet_prelude::ConstU32, BoundedVec, PalletError}; +use hex_literal::hex; use scale_info::TypeInfo; use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; use sp_core::{RuntimeDebug, H160, H256, U256}; @@ -300,3 +301,13 @@ impl GasMeter for () { 1 } } + +// Origin for high-priority governance commands +pub fn primary_governance_origin() -> H256 { + hex!("0000000000000000000000000000000000000000000000000000000000000001").into() +} + +// Origin for lower-priority governance commands +pub fn second_governance_origin() -> H256 { + hex!("0000000000000000000000000000000000000000000000000000000000000002").into() +}