polkascan / py-substrate-interface

Python Substrate Interface
https://polkascan.github.io/py-substrate-interface/
Apache License 2.0
240 stars 114 forks source link

substrate.get_metadata_modules How to output the specific call_functions name under count_call_functions? #231

Closed yytomives closed 2 years ago

yytomives commented 2 years ago

substrate.get_metadata_modules currently only prints count_call_functions, how can I print out the call_functions name of the corresponding module? for example, {'metadata_index': 0, 'module_id': 'System', 'name': 'System', 'spec_version': 2022072701, 'count_call_functions': 9, 'count_storage_functions': 16, 'count_events': 6, 'count_constants': 6, 'count_errors': 6} ,How to output the specific call_functions name under count_call_functions?

arjanz commented 2 years ago

With substrate.get_metadata_call_functions() and substrate.get_metadata_call_function(pallet_name, function_name), for more info: https://polkascan.github.io/py-substrate-interface/#substrateinterface.SubstrateInterface.get_metadata_call_functions