You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 theraw_revert()
builtin, except it issues theRETURN
opcode instead ofREVERT
. 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
The text was updated successfully, but these errors were encountered: