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

Commit

Permalink
Update tx.rs to include return_code in server respone (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
msobh13 authored Feb 19, 2024
1 parent ec415ab commit 160d159
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub struct TxInfo {
code: Option<Vec<u8>>,
#[serde(serialize_with = "serialize_optional_hex")]
data: Option<Vec<u8>>,
return_code: Option<i32>, // New field for return_code
/// Inner transaction type
tx: Option<TxDecoded>,
}
Expand Down Expand Up @@ -189,9 +190,10 @@ impl TryFrom<Row> for TxInfo {
let gas_limit_multiplier = row.try_get("gas_limit_multiplier")?;
let code: Option<Vec<u8>> = row.try_get("code")?;
let data: Option<Vec<u8>> = row.try_get("data")?;
let return_code = row.try_get("return_code")?;

Ok(Self {
hash,
hash,
block_id,
tx_type,
wrapper_id,
Expand All @@ -200,6 +202,7 @@ impl TryFrom<Row> for TxInfo {
gas_limit_multiplier,
code,
data,
return_code, // Assigning return_code to the struct field
tx: None,
})
}
Expand Down

0 comments on commit 160d159

Please sign in to comment.