From 27c8625783e8c10335663b1eb6fcd47731fa9b7a Mon Sep 17 00:00:00 2001 From: vladimir Date: Thu, 9 Nov 2023 20:29:11 +0400 Subject: [PATCH] adds prove to permit deposit test --- test/zkbob/ZkBobSequencer.t.sol | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/zkbob/ZkBobSequencer.t.sol b/test/zkbob/ZkBobSequencer.t.sol index c433f2a..1e59848 100644 --- a/test/zkbob/ZkBobSequencer.t.sol +++ b/test/zkbob/ZkBobSequencer.t.sol @@ -296,12 +296,12 @@ abstract contract AbstractZkBobPoolSequencerTest is AbstractForkTest { assertTrue(prover2BalanceAfter == prover2BalanceBefore + prover2FeeBefore * denominator); } - function testPermitDepositCommit() external { + function testPermitDepositCommitAndProve() external { uint256 amount = uint256(38); uint64 proxyFee = uint64(66); uint64 proverFee = uint64(77); - (bytes memory commitData, ) = _encodePermitDeposit( + (bytes memory commitData, bytes memory proveData) = _encodePermitDeposit( amount, user1, proxyFee, @@ -315,6 +315,11 @@ abstract contract AbstractZkBobPoolSequencerTest is AbstractForkTest { ); assertTrue(success); + + (success, ) = address(sequencer).call( + (abi.encodePacked(ZkBobSequencer.prove.selector, proveData)) + ); + } function deposit(int256 amount, uint64 proxyFee, uint64 proverFee, address prover) internal {