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 don't work for delegate calls #555

Open
charles-liu opened this issue Jan 10, 2022 · 0 comments
Open

RETURNDATASIZE / RETURNDATACOPY don't work for delegate calls #555

charles-liu opened this issue Jan 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request vm VM related issues

Comments

@charles-liu
Copy link
Contributor

There are two ways to get return data of a delegate call:

  • For static-size types, caller passes a memory offset and the length of return data through the stack, then read the memory from the offset.
  • For dynamic-size types, caller execute RETURNDATACOPY to get the size of return data and execute RETURNDATACOPY to copy return data to the memory.

Consider both the above second scenario and #553 , RETURNDATASIZE / RETURNDATACOPY should follow the rules:

  • If a delegate call has been executed in this receiving session, get the return data from the context.
  • Otherwise get it from the calldata of the callback transaction.
@charles-liu charles-liu added the enhancement New feature or request label Jan 10, 2022
@charles-liu charles-liu self-assigned this Jan 10, 2022
@charles-liu charles-liu 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
enhancement New feature or request vm VM related issues
Projects
None yet
Development

No branches or pull requests

1 participant