From 160d15960cddfe75c419bb44b164d4a38f88400e Mon Sep 17 00:00:00 2001 From: msobh13 <78115394+msobh13@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:20:46 +0400 Subject: [PATCH] Update tx.rs to include return_code in server respone (#141) --- src/server/tx.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/tx.rs b/src/server/tx.rs index 4aced4d..9dc72ec 100644 --- a/src/server/tx.rs +++ b/src/server/tx.rs @@ -84,6 +84,7 @@ pub struct TxInfo { code: Option>, #[serde(serialize_with = "serialize_optional_hex")] data: Option>, + return_code: Option, // New field for return_code /// Inner transaction type tx: Option, } @@ -189,9 +190,10 @@ impl TryFrom for TxInfo { let gas_limit_multiplier = row.try_get("gas_limit_multiplier")?; let code: Option> = row.try_get("code")?; let data: Option> = row.try_get("data")?; + let return_code = row.try_get("return_code")?; Ok(Self { - hash, + hash, block_id, tx_type, wrapper_id, @@ -200,6 +202,7 @@ impl TryFrom for TxInfo { gas_limit_multiplier, code, data, + return_code, // Assigning return_code to the struct field tx: None, }) }