Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Revert the change moving call index to primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Jan 17, 2024
1 parent b4f34d7 commit d8787fb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ use xcm::latest::prelude::*;

#[test]
fn test_foreign_create_asset_call_compatibility() {
assert_eq!(
RuntimeCall::ForeignAssets(pallet_assets::Call::create {
id: MultiLocation::default(),
admin: MultiAddress::Id([0; 32].into()),
min_balance: 1,
})
.encode(),
snowbridge_router_primitives::inbound::Call::ForeignAssets(
snowbridge_router_primitives::inbound::ForeignAssetsCall::create {
id: MultiLocation::default(),
admin: MultiAddress::Id([0; 32].into()),
min_balance: 1,
}
)
.encode()
);
// assert_eq!(
// RuntimeCall::ForeignAssets(pallet_assets::Call::create {
// id: MultiLocation::default(),
// admin: MultiAddress::Id([0; 32].into()),
// min_balance: 1,
// })
// .encode(),
// snowbridge_router_primitives::inbound::Call::ForeignAssets(
// snowbridge_router_primitives::inbound::ForeignAssetsCall::create {
// id: MultiLocation::default(),
// admin: MultiAddress::Id([0; 32].into()),
// min_balance: 1,
// }
// )
// .encode()
// );
}

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ parameter_types! {
}

parameter_types! {
pub const CreateAssetCall: [u8;2] = [53, 0];
pub const CreateAssetDeposit: u128 = (UNITS / 10) + EXISTENTIAL_DEPOSIT;
pub const InboundQueuePalletInstance: u8 = parachains_common::rococo::snowbridge::INBOUND_QUEUE_PALLET_INDEX;
pub Parameters: PricingParameters<u128> = PricingParameters {
Expand Down Expand Up @@ -559,8 +560,13 @@ impl snowbridge_pallet_inbound_queue::Config for Runtime {
type GatewayAddress = EthereumGatewayAddress;
#[cfg(feature = "runtime-benchmarks")]
type Helper = Runtime;
type MessageConverter =
MessageToXcm<CreateAssetDeposit, InboundQueuePalletInstance, AccountId, Balance>;
type MessageConverter = MessageToXcm<
CreateAssetCall,
CreateAssetDeposit,
InboundQueuePalletInstance,
AccountId,
Balance,
>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type MaxMessageSize = ConstU32<2048>;
Expand Down

0 comments on commit d8787fb

Please sign in to comment.