From 40f255cbca1b32c429c3eb7f8d35fcd46e83efee Mon Sep 17 00:00:00 2001 From: Arjan Zijderveld <5286904+arjanz@users.noreply.github.com> Date: Mon, 20 Nov 2023 14:34:26 +0100 Subject: [PATCH] Added return type hinting for compose_call #363 --- substrateinterface/base.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/substrateinterface/base.py b/substrateinterface/base.py index b38253e..05ca364 100644 --- a/substrateinterface/base.py +++ b/substrateinterface/base.py @@ -584,7 +584,7 @@ def get_block_runtime_version(self, block_hash): return response.get('result') def generate_storage_hash(self, storage_module: str, storage_function: str, params: list = None, - hashers: list = None): + hashers: list = None) -> str: """ Generate a storage key for given module/function @@ -1377,7 +1377,9 @@ def create_scale_object( return self.runtime_config.create_scale_object(type_string, data=data, **kwargs) - def compose_call(self, call_module: str, call_function: str, call_params: dict = None, block_hash: str = None): + def compose_call( + self, call_module: str, call_function: str, call_params: dict = None, block_hash: str = None + ) -> GenericCall: """ Composes a call payload which can be used in an extrinsic. @@ -1540,10 +1542,12 @@ def generate_signature_payload(self, call: GenericCall, era=None, nonce: int = 0 return signature_payload.data - def create_signed_extrinsic(self, call: GenericCall, keypair: Keypair, era: dict = None, nonce: int = None, - tip: int = 0, tip_asset_id: int = None, signature: Union[bytes, str] = None) -> GenericExtrinsic: + def create_signed_extrinsic( + self, call: GenericCall, keypair: Keypair, era: dict = None, nonce: int = None, + tip: int = 0, tip_asset_id: int = None, signature: Union[bytes, str] = None + ) -> GenericExtrinsic: """ - Creates a extrinsic signed by given account details + Creates an extrinsic signed by given account details Parameters ----------