Skip to content

Commit

Permalink
fix encoding for indices
Browse files Browse the repository at this point in the history
Co-authored-by: Kirill Fedoseev <[email protected]>
  • Loading branch information
r0wdy1 and k1rill-fedoseev authored Dec 19, 2023
1 parent e318314 commit 0deecfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/zkbob/manager/MPCGuard.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ contract MPCGuard is Ownable, CustomABIDecoder {

ZkBobPool poolContract = ZkBobPool(pool);

bytes memory mpc_message = abi.encodePacked(
bytes memory mpc_message = abi.encodeWithSelector(
ZkBobPool(pool).appendDirectDeposits.selector,
_root_after,
_indices,
_out_commit,
_batch_deposit_proof,
_tree_proof,
poolContract.roots(poolContract.pool_index()),
poolContract.pool_id()
_tree_proof
);
uint256 currentRoot = poolContract.roots(poolContract.pool_index());
bytes32 digest = digest(abi.encodePacked(mpc_message, currentRoot, poolContract.pool_id()));

require(checkQuorum(signatures, digest(mpc_message)));
IZkBobPool(pool).appendDirectDeposits(_root_after, _indices, _out_commit, _batch_deposit_proof, _tree_proof);
Expand Down

0 comments on commit 0deecfe

Please sign in to comment.