Skip to content

Commit

Permalink
fix: add error message for send() builtin (#3459)
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed May 25, 2023
1 parent 19073da commit 070b0cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vyper/builtins/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,9 @@ def build_IR(self, expr, args, kwargs, context):
to, value = args
gas = kwargs["gas"]
context.check_is_not_constant("send ether", expr)
return IRnode.from_list(["assert", ["call", gas, to, value, 0, 0, 0, 0]])
return IRnode.from_list(
["assert", ["call", gas, to, value, 0, 0, 0, 0]], error_msg="send failed"
)


class SelfDestruct(BuiltinFunction):
Expand Down

0 comments on commit 070b0cf

Please sign in to comment.