Merge pull request #24 from appliedzkp/fix/zero-node

Fix/zero node
This commit is contained in:
Omar Desogus
2022-03-09 18:10:16 +01:00
committed by GitHub
3 changed files with 3 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ library IncrementalBinaryTree {
uint8 depth,
uint256 zero
) public {
require(zero < SNARK_SCALAR_FIELD, "IncrementalBinaryTree: leaf must be < SNARK_SCALAR_FIELD");
require(depth > 0 && depth <= MAX_DEPTH, "IncrementalBinaryTree: tree depth must be between 1 and 32");
self.depth = depth;

View File

@@ -31,6 +31,7 @@ library IncrementalQuinTree {
uint8 depth,
uint256 zero
) public {
require(zero < SNARK_SCALAR_FIELD, "IncrementalBinaryTree: leaf must be < SNARK_SCALAR_FIELD");
require(depth > 0 && depth <= MAX_DEPTH, "IncrementalQuinTree: tree depth must be between 1 and 32");
self.depth = depth;

View File

@@ -1,6 +1,6 @@
{
"name": "@zk-kit/incremental-merkle-tree.sol",
"version": "0.3.0",
"version": "0.3.1",
"description": "Incremental Merkle tree Solidity libraries.",
"license": "MIT",
"files": [