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

RETURNDATASIZE / RETURNDATACOPY are not working #553

Open
vuilder0 opened this issue Jan 8, 2022 · 0 comments
Open

RETURNDATASIZE / RETURNDATACOPY are not working #553

vuilder0 opened this issue Jan 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working vm VM related issues

Comments

@vuilder0
Copy link
Contributor

vuilder0 commented Jan 8, 2022

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.

@vuilder0 vuilder0 added the bug Something isn't working label Jan 8, 2022
@vuilder0 vuilder0 self-assigned this Jan 8, 2022
@vuilder0 vuilder0 added the vm VM related issues label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vm VM related issues
Projects
None yet
Development

No branches or pull requests

1 participant