@@ -3,8 +3,8 @@ pragma solidity 0.8.23;
33
44import {Address} from "@openzeppelin/contracts/utils/Address.sol " ;
55
6- library PoseidonUnit1L {
7- function poseidon (bytes32 [1 ] calldata ) public pure returns (bytes32 ) {}
6+ library PoseidonUnit4L {
7+ function poseidon (bytes32 [4 ] calldata ) public pure returns (bytes32 ) {}
88}
99
1010/**
@@ -72,7 +72,7 @@ contract Depositor {
7272 * @param secret The secret used to withdraw the deposit.
7373 * @param secretHash The Poseidon hash of the secret used to create the deposit.
7474 */
75- event Withdrawn (address indexed recipient , uint256 amount , bytes32 secret , bytes32 secretHash );
75+ event Withdrawn (address indexed recipient , uint256 amount , bytes32 [ 4 ] secret , bytes32 secretHash );
7676
7777 /**
7878 * @notice Emitted when deposited funds are restored to the sender after the lock time has expired.
@@ -155,8 +155,8 @@ contract Depositor {
155155 * Uses the PoseidonUnit1L library to hash the provided secret.
156156 * @param secret_ The prototype of the `secretHash` used in the deposit function.
157157 */
158- function withdraw (bytes32 secret_ ) external {
159- bytes32 secretHash_ = PoseidonUnit1L .poseidon ([ secret_] );
158+ function withdraw (bytes32 [ 4 ] calldata secret_ ) external {
159+ bytes32 secretHash_ = PoseidonUnit4L .poseidon (secret_);
160160
161161 Deposit storage userDeposit = deposits[secretHash_];
162162
0 commit comments