go-vite icon indicating copy to clipboard operation
go-vite copied to clipboard

RETURNDATASIZE / RETURNDATACOPY are not working

Open charles-liu opened this issue 3 years ago • 0 comments

Description

RETURNDATASIZE is supposed to push the size of the returned data from the last external call into stack; RETURNDATACOPY is supposed to copy returned data to memory. But none of them work properly because of the asynchronous nature of Vite. Vite will not keep the context of the last external call, so c.returnData is always empty.

How To Fix

Return data can be unpack from the calldata of the send block of the callback transaction triggered when receiving an external call.

charles-liu avatar Jan 08 '22 12:01 charles-liu