Skip to content
Merged
8 changes: 6 additions & 2 deletions vyper/builtin_functions/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,14 +1264,18 @@ class Send(BuiltinFunction):

_id = "send"
_inputs = [("to", AddressDefinition()), ("value", Uint256Definition())]
_kwargs = {"gas": KwargSettings(Uint256Definition(), "gas")}
_return_type = None

@process_inputs
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", 0, to, value, 0, 0, 0, 0]])

if isinstance(gas, str):
return IRnode.from_list(["assert", ["call", 0, to, value, 0, 0, 0, 0]])
else:
return IRnode.from_list(["assert", ["call", gas, to, value, 0, 0, 0, 0]])

class SelfDestruct(BuiltinFunction):

Expand Down