Skip to content
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 sdk/core/src/data/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub struct ApiLogs {
pub struct ApiSmartContractResult {
pub hash: String,
pub nonce: u64,
pub value: u64,
pub value: u128, // consider switching to BigUint if this proves insufficient
pub receiver: Bech32Address,
pub sender: Bech32Address,
#[serde(default)]
Expand Down
12 changes: 11 additions & 1 deletion sdk/core/tests/retrieve_tx_on_network_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use multiversx_chain_core::types::ReturnCode;
use multiversx_sdk::{
data::transaction::TransactionOnNetwork,
data::transaction::{TransactionInfo, TransactionOnNetwork},
retrieve_tx_on_network::{
extract_message_from_string_reason, find_code_and_message, parse_reason,
replace_with_error_message,
Expand Down Expand Up @@ -1028,3 +1028,13 @@ fn replace_logs_reason_invalid_test() {
tx.logs.unwrap().events[0].topics
);
}

#[test]
fn tx_with_large_scr_value() {
let tx_str = include_str!("tx_with_large_scr_value.json");

let tx_info = serde_json::from_str::<TransactionInfo>(tx_str).unwrap();

let scr_with_large_value = &tx_info.data.unwrap().transaction.smart_contract_results[5];
assert!(scr_with_large_value.value > u64::MAX as u128);
}
Loading
Loading