Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add return code #2

Merged
merged 1 commit into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading