From f5dff60f41280d45dd2a9a024d3e8d620af444ac Mon Sep 17 00:00:00 2001 From: Gautham Date: Thu, 16 May 2024 10:30:12 +0300 Subject: [PATCH] Add extra data to event --- pallets/xcm-helper/src/lib.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 2cc0892ba..ab201728f 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -130,7 +130,7 @@ pub mod pallet { __private::log, }; use frame_system::pallet_prelude::*; - use thea_primitives::extras::extract_data_from_multilocation; + use thea_primitives::extras::{extract_data_from_multilocation, ExtraData}; use polkadex_primitives::Resolver; use sp_core::{sp_std, H160}; @@ -265,8 +265,14 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Asset Deposited from XCM - /// parameters. [id, recipient, multi-asset, asset_id] - AssetDeposited(H160, Box, Box, polkadex_primitives::AssetId), + /// parameters. [id, recipient, multi-asset, asset_id, extradata] + AssetDeposited( + H160, + Box, + Box, + polkadex_primitives::AssetId, + ExtraData, + ), /// Asset Withdraw using XCM /// parameters. [id, asset_id] AssetWithdrawn(H160, polkadex_primitives::AssetId), @@ -424,6 +430,7 @@ pub mod pallet { Box::new(*who), Box::new(what.clone()), asset_id, + extra, )); Ok(()) }