vyper icon indicating copy to clipboard operation
vyper copied to clipboard

add `revert_on_failure=False` kwarg to create builtins

Open pcaversaccio opened this issue 1 year ago • 0 comments

I think on the (off-chain) tooling side it would be useful to have the possibility to enable bubbling up the revert reasons for the create built-ins such as create_minimal_proxy_to, create_copy_of, create_from_blueprint, and the planned raw_create built-in here. This means you could add a kwarg to these functions like raw_revert_data: uint256 = 0 and if it's above 0 the functions also return some return_data with Bytes[raw_revert_data] that can be processed further in case of a failure. If revert_on_failure is True, the called revert statement should be like raw_revert(return_data).

pcaversaccio avatar Jun 14 '24 09:06 pcaversaccio