@@ -59,7 +59,7 @@ use namada_proof_of_stake::types::{
5959use namada_state:: { BlockHeader , LastBlock } ;
6060use namada_token:: masp:: MaspTokenRewardData ;
6161use namada_tx:: data:: { BatchedTxResult , DryRunResult , ResultCode , TxResult } ;
62- use namada_tx:: event:: { Batch as BatchAttr , Code as CodeAttr } ;
62+ use namada_tx:: event:: { Batch as BatchAttr , Code as CodeAttr , CometTxHash } ;
6363use serde:: { Deserialize , Serialize } ;
6464
6565use crate :: args:: { InputAmount , OsmosisPoolHop , Slippage } ;
@@ -703,6 +703,8 @@ pub struct TxResponse {
703703 pub code : ResultCode ,
704704 /// Gas used.
705705 pub gas_used : WholeGas ,
706+ /// CometBFT matching tx hash
707+ pub comet_tx_hash : Hash ,
706708}
707709
708710/// Determines a result of an inner tx from
@@ -744,6 +746,9 @@ impl TryFrom<TxAppliedEvents> for TxResponse {
744746 let gas_used = applied_event
745747 . read_attribute :: < GasUsedAttr > ( )
746748 . map_err ( |err| err. to_string ( ) ) ?;
749+ let comet_tx_hash = applied_event
750+ . read_attribute :: < CometTxHash > ( )
751+ . map_err ( |err| err. to_string ( ) ) ?;
747752
748753 // Reconstruct the inner txs' events
749754 if let Some ( batch) = & mut batch {
@@ -773,6 +778,7 @@ impl TryFrom<TxAppliedEvents> for TxResponse {
773778 height,
774779 code,
775780 gas_used,
781+ comet_tx_hash,
776782 } )
777783 }
778784}
0 commit comments