Skip to content

Commit

Permalink
Seperate V1&V2 more clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Oct 23, 2024
1 parent 9cd9890 commit a0deaba
Show file tree
Hide file tree
Showing 25 changed files with 807 additions and 808 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use frame_benchmarking::v2::*;
use snowbridge_core::{
outbound::{Command, Initializer, QueuedMessage},
outbound::v1::{Command, Initializer, QueuedMessage},
ChannelId,
};
use sp_core::{H160, H256};
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ use frame_support::{
};
use snowbridge_core::{
inbound::Message as DeliveryMessage,
outbound_v2::{CommandWrapper, Fee, GasMeter, Message},
outbound::v2::{CommandWrapper, Fee, GasMeter, Message},
BasicOperatingMode,
};
use snowbridge_merkle_tree::merkle_root;
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use snowbridge_core::{
gwei,
inbound::{Log, Proof, VerificationError, Verifier},
meth,
outbound_v2::*,
outbound::v2::*,
pricing::{PricingParameters, Rewards},
primary_governance_origin, ParaId,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use frame_support::{
traits::{EnqueueMessage, Get},
};
use snowbridge_core::{
outbound_v2::{Message, SendError, SendMessage, SendMessageFeeProvider},
outbound::v2::{Message, SendError, SendMessage, SendMessageFeeProvider},
primary_governance_origin,
};
use sp_core::H256;
use sp_runtime::{traits::Zero, BoundedVec};
use sp_runtime::BoundedVec;

/// The maximal length of an enqueued message, as determined by the MessageQueue pallet
pub type MaxEnqueuedMessageSizeOf<T> =
Expand All @@ -35,7 +35,7 @@ where
SendError::MessageTooLarge
);

let fee = Fee::from((Self::calculate_local_fee(), T::Balance::zero()));
let fee = Fee::from(Self::calculate_local_fee());

Ok((message.clone(), fee))
}
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue-v2/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use frame_support::{

use codec::Encode;
use snowbridge_core::{
outbound_v2::{Command, SendError, SendMessage},
outbound::v2::{Command, SendError, SendMessage},
primary_governance_origin, ChannelId, ParaId,
};
use sp_core::H256;
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue-v2/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use sp_std::prelude::*;

use super::Pallet;

use snowbridge_core::outbound_v2::CommandWrapper;
use snowbridge_core::outbound::v2::CommandWrapper;
pub use snowbridge_merkle_tree::MerkleProof;

pub type ProcessMessageOriginOf<T> = <Pallet<T> as ProcessMessage>::Origin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use frame_support::traits::tokens::Balance as BalanceT;
use snowbridge_core::{
outbound::{Command, Fee},
outbound::v1::{Command, Fee},
PricingParameters,
};
use snowbridge_outbound_queue_merkle_tree::MerkleProof;
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use crate::{Config, MessageLeaves};
use frame_support::storage::StorageStreamIter;
use snowbridge_core::{
outbound::{Command, Fee, GasMeter},
outbound::v1::{Command, Fee, GasMeter},
PricingParameters,
};
use snowbridge_outbound_queue_merkle_tree::{merkle_proof, MerkleProof};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bridge_hub_common::AggregateMessageOrigin;
use codec::Encode;
use frame_benchmarking::v2::*;
use snowbridge_core::{
outbound::{Command, Initializer},
outbound::v1::{Command, Initializer},
ChannelId,
};
use sp_core::{H160, H256};
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ use frame_support::{
weights::{Weight, WeightToFee},
};
use snowbridge_core::{
outbound::{Fee, GasMeter, QueuedMessage, VersionedQueuedMessage, ETHER_DECIMALS},
outbound::v1::{Fee, GasMeter, QueuedMessage, VersionedQueuedMessage, ETHER_DECIMALS},
BasicOperatingMode, ChannelId,
};
use snowbridge_outbound_queue_merkle_tree::merkle_root;
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use frame_support::{

use snowbridge_core::{
gwei, meth,
outbound::*,
outbound::v1::*,
pricing::{PricingParameters, Rewards},
ParaId, PRIMARY_GOVERNANCE_CHANNEL,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use frame_support::{
};
use frame_system::unique;
use snowbridge_core::{
outbound::{
outbound::v1::{
Fee, Message, QueuedMessage, SendError, SendMessage, SendMessageFeeProvider,
VersionedQueuedMessage,
},
Expand Down
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use frame_support::{

use codec::Encode;
use snowbridge_core::{
outbound::{Command, SendError, SendMessage},
outbound::v1::{Command, SendError, SendMessage},
ParaId, PricingParameters, Rewards,
};
use sp_arithmetic::FixedU128;
Expand Down
5 changes: 4 additions & 1 deletion bridges/snowbridge/pallets/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ use frame_support::{
use frame_system::pallet_prelude::*;
use snowbridge_core::{
meth,
outbound::{Command, Initializer, Message, OperatingMode, SendError, SendMessage},
outbound::{
v1::{Command, Initializer, Message, SendError, SendMessage},
OperatingMode,
},
sibling_sovereign_account, AgentId, AssetMetadata, Channel, ChannelId, ParaId,
PricingParameters as PricingParametersRecord, TokenId, TokenIdOf, PRIMARY_GOVERNANCE_CHANNEL,
SECONDARY_GOVERNANCE_CHANNEL,
Expand Down
1 change: 0 additions & 1 deletion bridges/snowbridge/primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub mod inbound;
pub mod location;
pub mod operating_mode;
pub mod outbound;
pub mod outbound_v2;
pub mod pricing;
pub mod ringbuffer;

Expand Down
Loading

0 comments on commit a0deaba

Please sign in to comment.