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

added support for empty return data #1770

Open
wants to merge 1 commit into
base: rc/v0.54
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ impl Interactor {

info!("{:#?}", result);

let raw_results: Vec<Vec<u8>> = result.data.return_data.iter().map(base64_decode).collect();
let raw_results: Vec<Vec<u8>> = if let Some(data) = result.data.return_data {
data.iter().map(base64_decode).collect()
} else {
Vec::new()
};

step.save_response(TxResponse::from_raw_results(raw_results));

Expand Down
2 changes: 1 addition & 1 deletion sdk/core/src/data/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub struct StorageUpdateApi {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct VMOutputApi {
pub return_data: Vec<String>,
pub return_data: Option<Vec<String>>,
pub return_code: String,
pub return_message: String,
pub gas_remaining: u64,
Expand Down
Loading