go-vite
go-vite copied to clipboard
RETURNDATASIZE / RETURNDATACOPY are not working
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.