Skip to content

VIP: Add raw_return builtin #4525

@charles-cooper

Description

@charles-cooper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions