Skip to content

Commit

Permalink
Merge pull request #2 from TuanTQ15/fix/add-return-code
Browse files Browse the repository at this point in the history
add return code
  • Loading branch information
HadesGuard authored Feb 11, 2024
2 parents e3b7709 + a01ae4d commit 9020b60
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

NAMADA_VERSION := 0.31.1
NAMADA_VERSION := 0.31.2
BASE_URL := https://raw.githubusercontent.com/anoma/namada
URL := $(BASE_URL)/v$(NAMADA_VERSION)/wasm/checksums.json

Expand Down
2 changes: 1 addition & 1 deletion src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ impl Database {

// Create the SQL query
let query = format!(
"SELECT * FROM {0}.{TX_TABLE_NAME} ORDER BY created_at DESC LIMIT {1} OFFSET {2}",
"SELECT * FROM {}.{TX_TABLE_NAME} ORDER BY created_at DESC LIMIT {1} OFFSET {2}",
self.network,
page_size,
offset
Expand Down
4 changes: 4 additions & 0 deletions src/server/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ pub struct TxInfo {
data: Option<Vec<u8>>,
/// Inner transaction type
tx: Option<TxDecoded>,

return_code: Option<i32>
}

impl TxInfo {
Expand Down Expand Up @@ -202,6 +204,7 @@ 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: Option<i32> = row.try_get("return_code")?;

Ok(Self {
hash,
Expand All @@ -213,6 +216,7 @@ impl TryFrom<Row> for TxInfo {
gas_limit_multiplier,
code,
data,
return_code,
tx: None,
})
}
Expand Down

0 comments on commit 9020b60

Please sign in to comment.