pub fn call(descriptor: *mut u8) { // This initializes safe wrapper for contract input and output let mut ctx = CallArgs::from_raw(descriptor); // Copies all contract input data to the separate buffer let data = ctx.context().to_vec(); // Appends all input to the storage (as it is a logger contract) let _ = storage::append(&data); // Returns all that passed to this contract as an output *ctx.result_mut() = data; // Saves the wrapper state to commit return stream ctx.save(descriptor); }
Full source with preamble
Input
[10, 12, 16]
Storage
[]
Result
[]
Gas cost:
0