@@ -3,40 +3,43 @@ pragma solidity ^0.8.0;
3
3
address constant ISTAKING_ADDRESS = 0x0000000000000000000000000000000000000801 ;
4
4
5
5
interface IStaking {
6
- /**
7
- * @dev Adds a subtensor stake corresponding to the value sent with the transaction, associated
8
- * with the `hotkey`.
9
- *
10
- * This function allows external accounts and contracts to stake TAO into the subtensor pallet,
11
- * which effectively calls `add_stake` on the subtensor pallet with specified hotkey as a parameter
12
- * and coldkey being the hashed address mapping of H160 sender address to Substrate ss58 address as
13
- * implemented in Frontier HashedAddressMapping:
14
- * https://github.com/polkadot-evm/frontier/blob/2e219e17a526125da003e64ef22ec037917083fa/frame/evm/src/lib.rs#L739
15
- *
16
- * @param hotkey The hotkey public key (32 bytes).
17
- *
18
- * Requirements:
19
- * - `hotkey` must be a valid hotkey registered on the network, ensuring that the stake is
20
- * correctly attributed.
21
- */
22
- function addStake (bytes32 hotkey ) external payable ;
6
+ /**
7
+ * @dev Adds a subtensor stake corresponding to the value sent with the transaction, associated
8
+ * with the `hotkey`.
9
+ *
10
+ * This function allows external accounts and contracts to stake TAO into the subtensor pallet,
11
+ * which effectively calls `add_stake` on the subtensor pallet with specified hotkey as a parameter
12
+ * and coldkey being the hashed address mapping of H160 sender address to Substrate ss58 address as
13
+ * implemented in Frontier HashedAddressMapping:
14
+ * https://github.com/polkadot-evm/frontier/blob/2e219e17a526125da003e64ef22ec037917083fa/frame/evm/src/lib.rs#L739
15
+ *
16
+ * @param hotkey The hotkey public key (32 bytes).
17
+ * @param netuid The subnet to stake to (uint16). Currently a noop, functionality will be enabled with RAO.
18
+ *
19
+ * Requirements:
20
+ * - `hotkey` must be a valid hotkey registered on the network, ensuring that the stake is
21
+ * correctly attributed.
22
+ */
23
+ function addStake (bytes32 hotkey , uint16 netuid ) external payable ;
23
24
24
- /**
25
- * @dev Removes a subtensor stake `amount` from the specified `hotkey`.
26
- *
27
- * This function allows external accounts and contracts to unstake TAO from the subtensor pallet,
28
- * which effectively calls `remove_stake` on the subtensor pallet with specified hotkey as a parameter
29
- * and coldkey being the hashed address mapping of H160 sender address to Substrate ss58 address as
30
- * implemented in Frontier HashedAddressMapping:
31
- * https://github.com/polkadot-evm/frontier/blob/2e219e17a526125da003e64ef22ec037917083fa/frame/evm/src/lib.rs#L739
32
- *
33
- * @param hotkey The hotkey public key (32 bytes).
34
- * @param amount The amount to unstake in rao.
35
- *
36
- * Requirements:
37
- * - `hotkey` must be a valid hotkey registered on the network, ensuring that the stake is
38
- * correctly attributed.
39
- * - The existing stake amount must be not lower than specified amount
40
- */
41
- function removeStake (bytes32 hotkey , uint256 amount ) external ;
42
- }
25
+ /**
26
+ * @dev Removes a subtensor stake `amount` from the specified `hotkey`.
27
+ *
28
+ * This function allows external accounts and contracts to unstake TAO from the subtensor pallet,
29
+ * which effectively calls `remove_stake` on the subtensor pallet with specified hotkey as a parameter
30
+ * and coldkey being the hashed address mapping of H160 sender address to Substrate ss58 address as
31
+ * implemented in Frontier HashedAddressMapping:
32
+ * https://github.com/polkadot-evm/frontier/blob/2e219e17a526125da003e64ef22ec037917083fa/frame/evm/src/lib.rs#L739
33
+ *
34
+ * @param hotkey The hotkey public key (32 bytes).
35
+ * @param amount The amount to unstake in rao.
36
+ * @param netuid The subnet to stake to (uint16). Currently a noop, functionality will be enabled with RAO.
37
+
38
+ *
39
+ * Requirements:
40
+ * - `hotkey` must be a valid hotkey registered on the network, ensuring that the stake is
41
+ * correctly attributed.
42
+ * - The existing stake amount must be not lower than specified amount
43
+ */
44
+ function removeStake (bytes32 hotkey , uint256 amount , uint16 netuid ) external ;
45
+ }
0 commit comments