Skip to content

Commit

Permalink
FIX: V-WBT-VUL-005
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone committed Aug 25, 2023
1 parent c6e9121 commit 11c866f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/contracts/contracts/hashers/PoseidonHasher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { SnarkConstants } from "./SnarkConstants.sol";
/// @notice This contract is meant to be used for poseidon merkle trees and other poseidon based hashing.
contract PoseidonHasher is SnarkConstants, IHasher {
function hash1(uint256 value) public pure returns (uint256) {
require(array[i] < SNARK_SCALAR_FIELD, "Value not in field");
uint256[1] memory input;
input[0] = value;
return PoseidonT2.poseidon(input);
Expand Down

0 comments on commit 11c866f

Please sign in to comment.