@@ -183,7 +183,7 @@ describe("Staking", async () => {
183183 await pnk . connect ( juror ) . approve ( core . target , PNK ( 1000 ) ) ;
184184 await expect ( await core . connect ( juror ) . setStake ( 1 , PNK ( 1000 ) ) )
185185 . to . emit ( sortition , "StakeSet" )
186- . withArgs ( juror . address , 1 , PNK ( 1000 ) ) ;
186+ . withArgs ( juror . address , 1 , PNK ( 1000 ) , PNK ( 1000 ) ) ;
187187 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 1000 ) ) ;
188188 } ) ;
189189 } ) ;
@@ -201,17 +201,17 @@ describe("Staking", async () => {
201201 it ( "Should be able to unstake" , async ( ) => {
202202 expect ( await core . connect ( juror ) . setStake ( 1 , PNK ( 500 ) ) )
203203 . to . emit ( sortition , "StakeSet" )
204- . withArgs ( juror . address , 1 , PNK ( 500 ) ) ;
204+ . withArgs ( juror . address , 1 , PNK ( 500 ) , PNK ( 500 ) ) ;
205205 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 500 ) ) ;
206206
207207 expect ( await core . connect ( juror ) . setStake ( 1 , PNK ( 1001 ) ) )
208208 . to . emit ( sortition , "StakeSet" )
209- . withArgs ( juror . address , 1 , PNK ( 1001 ) ) ;
209+ . withArgs ( juror . address , 1 , PNK ( 1001 ) , PNK ( 1001 ) ) ;
210210 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 1001 ) ) ;
211211
212212 expect ( await core . connect ( juror ) . setStake ( 1 , PNK ( 0 ) ) )
213213 . to . emit ( sortition , "StakeSet" )
214- . withArgs ( juror . address , 1 , PNK ( 0 ) ) ;
214+ . withArgs ( juror . address , 1 , PNK ( 0 ) , PNK ( 0 ) ) ;
215215 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 0 ) ) ;
216216 } ) ;
217217 } ) ;
@@ -230,7 +230,7 @@ describe("Staking", async () => {
230230 await drawAndReachStakingPhaseFromGenerating ( ) ;
231231 expect ( await sortition . executeDelayedStakes ( 10 ) )
232232 . to . emit ( sortition , "StakeSet" )
233- . withArgs ( juror . address , 1 , PNK ( 0 ) ) ;
233+ . withArgs ( juror . address , 1 , PNK ( 0 ) , PNK ( 0 ) ) ;
234234 } ) ;
235235 } ) ;
236236 } ) ;
@@ -279,7 +279,7 @@ describe("Staking", async () => {
279279 await drawAndReachStakingPhaseFromGenerating ( ) ;
280280 expect ( await sortition . executeDelayedStakes ( 10 ) )
281281 . to . emit ( sortition , "StakeSet" )
282- . withArgs ( juror . address , 1 , PNK ( 2000 ) ) ;
282+ . withArgs ( juror . address , 1 , PNK ( 2000 ) , PNK ( 2000 ) ) ;
283283 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 2000 ) ) ;
284284 } ) ;
285285 } ) ;
@@ -309,7 +309,7 @@ describe("Staking", async () => {
309309 await pnk . connect ( juror ) . approve ( core . target , PNK ( 1000 ) ) ;
310310 await expect ( await core . connect ( juror ) . setStake ( 1 , PNK ( 1000 ) ) )
311311 . to . emit ( sortition , "StakeSet" )
312- . withArgs ( juror . address , 1 , PNK ( 1000 ) ) ;
312+ . withArgs ( juror . address , 1 , PNK ( 1000 ) , PNK ( 1000 ) ) ;
313313 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 3000 ) ) ;
314314 } ) ;
315315 } ) ;
@@ -340,7 +340,7 @@ describe("Staking", async () => {
340340 await drawAndReachStakingPhaseFromGenerating ( ) ;
341341 await expect ( await sortition . executeDelayedStakes ( 10 ) )
342342 . to . emit ( sortition , "StakeSet" )
343- . withArgs ( juror . address , 1 , PNK ( 1000 ) ) ;
343+ . withArgs ( juror . address , 1 , PNK ( 1000 ) , PNK ( 1000 ) ) ;
344344 expect ( await sortition . totalStaked ( ) ) . to . be . equal ( PNK ( 3000 ) ) ;
345345 } ) ;
346346 } ) ;
@@ -456,7 +456,7 @@ describe("Staking", async () => {
456456 it ( "Should execute the delayed stakes" , async ( ) => {
457457 await expect ( await sortition . executeDelayedStakes ( 10 ) )
458458 . to . emit ( sortition , "StakeSet" )
459- . withArgs ( deployer , 2 , PNK ( 3000 ) )
459+ . withArgs ( deployer , 2 , PNK ( 3000 ) , PNK ( 5000 ) )
460460 . to . not . emit ( sortition , "StakeDelayedNotTransferred" )
461461 . to . not . emit ( sortition , "StakeDelayedAlreadyTransferred" )
462462 . to . not . emit ( sortition , "StakeDelayedAlreadyTransferredWithdrawn" ) ;
@@ -524,7 +524,7 @@ describe("Staking", async () => {
524524 it ( "Should execute the delayed stakes by withdrawing PNK and reducing the stakes" , async ( ) => {
525525 await expect ( await sortition . executeDelayedStakes ( 10 ) )
526526 . to . emit ( sortition , "StakeSet" )
527- . withArgs ( deployer , 2 , PNK ( 1000 ) ) ;
527+ . withArgs ( deployer , 2 , PNK ( 1000 ) , PNK ( 3000 ) ) ;
528528 expect ( await sortition . getJurorBalance ( deployer , 2 ) ) . to . be . deep . equal ( [
529529 PNK ( 3000 ) ,
530530 PNK ( 300 ) , // we're the only juror so we are drawn 3 times
@@ -613,7 +613,7 @@ describe("Staking", async () => {
613613 it ( "Should execute the delayed stakes but the stakes should remain the same" , async ( ) => {
614614 await expect ( await sortition . executeDelayedStakes ( 10 ) )
615615 . to . emit ( sortition , "StakeSet" )
616- . withArgs ( deployer , 2 , PNK ( 2000 ) ) ;
616+ . withArgs ( deployer , 2 , PNK ( 2000 ) , PNK ( 4000 ) ) ;
617617 expect ( await sortition . getJurorBalance ( deployer , 2 ) ) . to . be . deep . equal ( [
618618 PNK ( 4000 ) ,
619619 PNK ( 300 ) , // we're the only juror so we are drawn 3 times
@@ -704,7 +704,7 @@ describe("Staking", async () => {
704704 it ( "Should execute the delayed stakes but the stakes should remain the same" , async ( ) => {
705705 await expect ( sortition . executeDelayedStakes ( 10 ) )
706706 . to . emit ( await sortition , "StakeSet" )
707- . withArgs ( deployer , 2 , PNK ( 2000 ) )
707+ . withArgs ( deployer , 2 , PNK ( 2000 ) , PNK ( 4000 ) )
708708 . to . not . emit ( sortition , "StakeDelayedNotTransferred" )
709709 . to . not . emit ( sortition , "StakeDelayedAlreadyTransferred" )
710710 . to . not . emit ( sortition , "StakeDelayedAlreadyTransferredWithdrawn" ) ;
0 commit comments