@@ -17,6 +17,7 @@ async def add_liquidity_extrinsic(
17
17
liquidity : Balance ,
18
18
price_low : Balance ,
19
19
price_high : Balance ,
20
+ hotkey : Optional [str ] = None ,
20
21
wait_for_inclusion : bool = True ,
21
22
wait_for_finalization : bool = False ,
22
23
period : Optional [int ] = None ,
@@ -31,6 +32,7 @@ async def add_liquidity_extrinsic(
31
32
liquidity: The amount of liquidity to be added.
32
33
price_low: The lower bound of the price tick range.
33
34
price_high: The upper bound of the price tick range.
35
+ hotkey: The hotkey with staked TAO in Alpha. If not passed then the wallet hotkey is used. Defaults to `None`.
34
36
wait_for_inclusion: Whether to wait for the extrinsic to be included in a block. Defaults to True.
35
37
wait_for_finalization: Whether to wait for finalization of the extrinsic. Defaults to False.
36
38
period: The number of blocks during which the transaction will remain valid after it's submitted. If
@@ -56,7 +58,7 @@ async def add_liquidity_extrinsic(
56
58
call_module = "Swap" ,
57
59
call_function = "add_liquidity" ,
58
60
call_params = {
59
- "hotkey" : wallet .hotkey .ss58_address ,
61
+ "hotkey" : hotkey or wallet .hotkey .ss58_address ,
60
62
"netuid" : netuid ,
61
63
"tick_low" : tick_low ,
62
64
"tick_high" : tick_high ,
@@ -80,6 +82,7 @@ async def modify_liquidity_extrinsic(
80
82
netuid : int ,
81
83
position_id : int ,
82
84
liquidity_delta : Balance ,
85
+ hotkey : Optional [str ] = None ,
83
86
wait_for_inclusion : bool = True ,
84
87
wait_for_finalization : bool = False ,
85
88
period : Optional [int ] = None ,
@@ -92,6 +95,7 @@ async def modify_liquidity_extrinsic(
92
95
netuid: The UID of the target subnet for which the call is being initiated.
93
96
position_id: The id of the position record in the pool.
94
97
liquidity_delta: The amount of liquidity to be added or removed (add if positive or remove if negative).
98
+ hotkey: The hotkey with staked TAO in Alpha. If not passed then the wallet hotkey is used. Defaults to `None`.
95
99
wait_for_inclusion: Whether to wait for the extrinsic to be included in a block. Defaults to True.
96
100
wait_for_finalization: Whether to wait for finalization of the extrinsic. Defaults to False.
97
101
period: The number of blocks during which the transaction will remain valid after it's submitted. If
@@ -114,7 +118,7 @@ async def modify_liquidity_extrinsic(
114
118
call_module = "Swap" ,
115
119
call_function = "modify_position" ,
116
120
call_params = {
117
- "hotkey" : wallet .hotkey .ss58_address ,
121
+ "hotkey" : hotkey or wallet .hotkey .ss58_address ,
118
122
"netuid" : netuid ,
119
123
"position_id" : position_id ,
120
124
"liquidity_delta" : liquidity_delta .rao ,
@@ -136,6 +140,7 @@ async def remove_liquidity_extrinsic(
136
140
wallet : "Wallet" ,
137
141
netuid : int ,
138
142
position_id : int ,
143
+ hotkey : Optional [str ] = None ,
139
144
wait_for_inclusion : bool = True ,
140
145
wait_for_finalization : bool = False ,
141
146
period : Optional [int ] = None ,
@@ -147,6 +152,7 @@ async def remove_liquidity_extrinsic(
147
152
wallet: The wallet used to sign the extrinsic (must be unlocked).
148
153
netuid: The UID of the target subnet for which the call is being initiated.
149
154
position_id: The id of the position record in the pool.
155
+ hotkey: The hotkey with staked TAO in Alpha. If not passed then the wallet hotkey is used. Defaults to `None`.
150
156
wait_for_inclusion: Whether to wait for the extrinsic to be included in a block. Defaults to True.
151
157
wait_for_finalization: Whether to wait for finalization of the extrinsic. Defaults to False.
152
158
period: The number of blocks during which the transaction will remain valid after it's submitted. If
@@ -169,7 +175,7 @@ async def remove_liquidity_extrinsic(
169
175
call_module = "Swap" ,
170
176
call_function = "remove_liquidity" ,
171
177
call_params = {
172
- "hotkey" : wallet .hotkey .ss58_address ,
178
+ "hotkey" : hotkey or wallet .hotkey .ss58_address ,
173
179
"netuid" : netuid ,
174
180
"position_id" : position_id ,
175
181
},
0 commit comments