@@ -17,7 +17,7 @@ describeSuite({
1717
1818 it ( {
1919 id : "T01" ,
20- title : "Check set_weights" ,
20+ title : "Fees for set_weights charged by coldkey instead of origin(hotkey) " ,
2121 test : async ( ) => {
2222 const coldkey = generateKeyringPair ( "sr25519" ) ;
2323 const hotkey = generateKeyringPair ( "sr25519" ) ;
@@ -28,8 +28,10 @@ describeSuite({
2828 const initialBalance = tao ( 1e10 ) ;
2929
3030 log ( "Set Up" ) ;
31+ const existentialDeposit = await api . consts . balances . existentialDeposit . toBigInt ( ) ;
32+ // Hotkey should "exist", even if coldkey is paying for tx
33+ await devForceSetBalance ( api , context , hotkey . address , existentialDeposit ) ;
3134 await devForceSetBalance ( api , context , coldkey . address , initialBalance ) ;
32- await devForceSetBalance ( api , context , hotkey . address , initialBalance ) ;
3335 await devTryAssociateHotkey ( api , context , coldkey , hotkey . address ) ;
3436
3537 const coldkeyBalanceBefore = ( await api . query . system . account ( coldkey . address ) ) . data . free . toBigInt ( ) ;
@@ -48,7 +50,7 @@ describeSuite({
4850 const txFee = feeEvent [ 0 ] . event . data . actualFee . toBigInt ( ) ;
4951 expect ( txFee ) . toBeGreaterThan ( 0n ) ;
5052 expect ( coldkeyBalanceAfter ) . toEqual ( coldkeyBalanceBefore - txFee ) ;
51- expect ( hotkeyBalance ) . toEqual ( initialBalance ) ;
53+ expect ( hotkeyBalance ) . toEqual ( existentialDeposit ) ;
5254 } ,
5355 } ) ;
5456 } ,
0 commit comments