Skip to main content

sol_get_return_data

Function sol_get_return_data 

Source
pub unsafe fn sol_get_return_data(
    data: *mut u8,
    length: u64,
    program_id: *mut u8,
) -> u64
Expand description

Read CPI return data set by the most recent CPI.

Returns the runtime-reported data length. If the return data is larger than the provided buffer, only length bytes are copied into data.

ยงSafety

data must be valid for length writable bytes and program_id must point to 32 writable bytes.