From 71882ed5ec76132cfae00afec056e9ccbd8bc9f1 Mon Sep 17 00:00:00 2001 From: Harry Kalogirou Date: Tue, 19 Mar 2024 16:29:38 +0200 Subject: [PATCH] add passthrough_data --- vyper/codegen/ir_node.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vyper/codegen/ir_node.py b/vyper/codegen/ir_node.py index e512b6c9bb..14e396ff74 100644 --- a/vyper/codegen/ir_node.py +++ b/vyper/codegen/ir_node.py @@ -135,6 +135,7 @@ class IRnode: args: List["IRnode"] value: Union[str, int] is_self_call: bool + passthrough_metadata: dict[str, Any] func_ir: Any common_ir: Any @@ -151,6 +152,7 @@ def __init__( add_gas_estimate: int = 0, encoding: Encoding = Encoding.VYPER, is_self_call: bool = False, + passthrough_metadata: dict[str, Any] = None, ): if args is None: args = [] @@ -169,6 +171,7 @@ def __init__( self.encoding = encoding self.as_hex = AS_HEX_DEFAULT self.is_self_call = is_self_call + self.passthrough_metadata = passthrough_metadata or {} self.func_ir = None self.common_ir = None @@ -554,6 +557,7 @@ def from_list( mutable: bool = True, add_gas_estimate: int = 0, is_self_call: bool = False, + passthrough_metadata: dict[str, Any] = None, encoding: Encoding = Encoding.VYPER, ) -> "IRnode": if isinstance(typ, str): # pragma: nocover @@ -587,6 +591,7 @@ def from_list( encoding=encoding, error_msg=error_msg, is_self_call=is_self_call, + passthrough_metadata=passthrough_metadata, ) else: return cls( @@ -601,4 +606,5 @@ def from_list( encoding=encoding, error_msg=error_msg, is_self_call=is_self_call, + passthrough_metadata=passthrough_metadata, )