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

VIP: Add raw_return builtin #4525

Open
charles-cooper opened this issue Mar 17, 2025 · 0 comments
Open

VIP: Add raw_return builtin #4525

charles-cooper opened this issue Mar 17, 2025 · 0 comments
Labels
release - must release blocker
Milestone

Comments

@charles-cooper
Copy link
Member

Simple Summary

Add a builtin to return Bytes data directly, rather than ABI-encoding the data.

Motivation

When delegatecalling as a proxy, you want to be able to return the bytes directly. More generally, users might want to have low-level access to the bytes returned.

Specification

raw_return(data: Bytes[...]) works similarly to the raw_revert() builtin, except it issues the RETURN opcode instead of REVERT. note that it is not type-safe, from the point of view of the language semantics, it functions like an exceptional terminator, and doesn't have a return type.

Backwards Compatibility

New feature, backwards compatible.

Dependencies

References

Copyright

Copyright and related rights waived via CC0

@charles-cooper charles-cooper added needs triage needs triage release - must release blocker and removed needs triage needs triage labels Mar 17, 2025
@charles-cooper charles-cooper added this to the v0.4.2 milestone Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release - must release blocker
Projects
None yet
Development

No branches or pull requests

1 participant