From f1802f64f57d3e2a8e7404c71a4a94d08813eeb3 Mon Sep 17 00:00:00 2001 From: dhfang Date: Wed, 29 May 2024 15:54:48 -0700 Subject: [PATCH 1/2] emit swap denoms in event attributes --- contracts/entry-point/src/execute.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/entry-point/src/execute.rs b/contracts/entry-point/src/execute.rs index 25ee020..87c9ac8 100644 --- a/contracts/entry-point/src/execute.rs +++ b/contracts/entry-point/src/execute.rs @@ -315,7 +315,9 @@ pub fn execute_user_swap( } // Create a response object to return - let mut response: Response = Response::new().add_attribute("action", "execute_user_swap"); + let mut response: Response = Response::new().add_attribute("action", "execute_user_swap") + .add_attribute("denom_in", remaining_asset.denom()) + .add_attribute("denom_out", min_asset.denom()); // Create affiliate response and total affiliate fee amount let mut affiliate_response: Response = Response::new(); From e5c68c1f3226e085643520a41d62fb9eb7f48d25 Mon Sep 17 00:00:00 2001 From: dhfang Date: Wed, 29 May 2024 15:59:07 -0700 Subject: [PATCH 2/2] format --- contracts/entry-point/src/execute.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/entry-point/src/execute.rs b/contracts/entry-point/src/execute.rs index 87c9ac8..c72be83 100644 --- a/contracts/entry-point/src/execute.rs +++ b/contracts/entry-point/src/execute.rs @@ -315,7 +315,8 @@ pub fn execute_user_swap( } // Create a response object to return - let mut response: Response = Response::new().add_attribute("action", "execute_user_swap") + let mut response: Response = Response::new() + .add_attribute("action", "execute_user_swap") .add_attribute("denom_in", remaining_asset.denom()) .add_attribute("denom_out", min_asset.denom());