degenbot.provider.call_helpers ============================== .. py:module:: degenbot.provider.call_helpers .. autoapi-nested-parse:: Low-level RPC call helpers. Thin wrappers around AlloyProvider.call() that handle ABI encoding/decoding and block identifier resolution. Module Contents --------------- .. py:function:: encode_function_calldata(function_prototype: str, function_arguments: collections.abc.Sequence[Any] | None) -> bytes Encode calldata for the given function prototype with ordered arguments. The resulting bytes array will include the 4-byte function selector, followed by the ABI-encoded arguments. :returns: The encoded calldata bytes. .. py:function:: extract_argument_types_from_function_prototype(function_prototype: str) -> list[str] Extract the argument types from the function prototype. e.g. the argument types for the prototype 'function(address,uint256)' are ['address','uint256'] :returns: The list of ABI type strings. .. py:function:: raw_call(provider: degenbot.provider.AlloyProvider, address: degenbot.types.chain.ChecksummedAddress, calldata: bytes, return_types: list[str], block_identifier: degenbot.types.rpc_types.BlockIdentifier | None = None) -> tuple[Any, ...] Perform an eth_call at the given address and return the decoded response. :param provider: AlloyProvider instance :param address: Contract address to call :param calldata: Encoded function call data :param return_types: ABI types for decoding the response :param block_identifier: Block number or tag for the call :returns: Decoded response as tuple