Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix contract-terminate example
  • Loading branch information
ascjones committed Jan 30, 2023
commit b5552c47cd86ab7c695dbc2ec5336d7f4eae7267
7 changes: 7 additions & 0 deletions crates/e2e/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ where
self.dry_run.message_result()
}

/// Returns the return value as raw bytes of the message from the dry-run.
///
/// Panics if the dry-run message call failed to execute.
pub fn return_data(&self) -> &[u8] {
&self.dry_run.exec_return_value().data
}

/// Returns the decoded return value of the message from the dry-run.
///
/// Panics if the value could not be decoded. The raw bytes can be accessed
Expand Down
2 changes: 1 addition & 1 deletion examples/contract-terminate/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub mod just_terminates {
.expect("terminate_me messages failed");

assert!(
call_res.data.is_empty(),
call_res.return_data().is_empty(),
"Terminated contract never returns"
);

Expand Down