34
34
SubtensorInterface ,
35
35
ProposalVoteData ,
36
36
)
37
+ from scalecodec .types import GenericMetadataVersioned
37
38
38
39
39
40
# helpers and extrinsics
@@ -91,8 +92,8 @@ def search_metadata(
91
92
param_name : str ,
92
93
value : Union [str , bool , float , list [float ]],
93
94
netuid : int ,
94
- metadata ,
95
- pallet : str = DEFAULT_PALLET ,
95
+ metadata : "GenericMetadataVersioned" ,
96
+ pallet_name : str = DEFAULT_PALLET ,
96
97
) -> tuple [bool , Optional [dict ]]:
97
98
"""
98
99
Searches the substrate metadata AdminUtils pallet for a given parameter name. Crafts a response dict to be used
@@ -103,7 +104,7 @@ def search_metadata(
103
104
value: the value to set the hyperparameter
104
105
netuid: the specified netuid
105
106
metadata: the subtensor.substrate.metadata
106
- pallet : the name of the module to use for the query. If not set, the default value is DEFAULT_PALLET
107
+ pallet_name : the name of the module to use for the query. If not set, the default value is DEFAULT_PALLET
107
108
108
109
Returns:
109
110
(success, dict of call params)
@@ -125,7 +126,7 @@ def type_converter_with_retry(type_, val, arg_name):
125
126
126
127
call_crafter = {"netuid" : netuid }
127
128
128
- pallet = metadata .get_metadata_pallet (pallet )
129
+ pallet = metadata .get_metadata_pallet (pallet_name )
129
130
for call in pallet .calls :
130
131
if call .name == param_name :
131
132
if "netuid" not in [x .name for x in call .args ]:
0 commit comments