diff --git a/.github/ISSUE_TEMPLATE/package_request.md b/.github/ISSUE_TEMPLATE/package_request.md index ba33c9d..a6eb274 100644 --- a/.github/ISSUE_TEMPLATE/package_request.md +++ b/.github/ISSUE_TEMPLATE/package_request.md @@ -8,7 +8,7 @@ labels: "" **Describe the package** A clear and concise description of what the package should be. -**Describe why it may be useful** +**Describe why it may be useful** A clear and concise description of the context in which this package could be used and why it may be usefulp. **Describe alternatives you've considered** diff --git a/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol b/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol index a8df710..15a8644 100644 --- a/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol +++ b/packages/incremental-merkle-tree.sol/contracts/BinaryTreeTest.sol @@ -5,40 +5,40 @@ pragma solidity ^0.8.4; import "./IncrementalBinaryTree.sol"; contract BinaryTreeTest { - using IncrementalBinaryTree for IncrementalTreeData; + using IncrementalBinaryTree for IncrementalTreeData; - event TreeCreated(bytes32 id, uint8 depth); - event LeafInserted(bytes32 indexed treeId, uint256 leaf, uint256 root); - event LeafRemoved(bytes32 indexed treeId, uint256 leaf, uint256 root); + event TreeCreated(bytes32 id, uint8 depth); + event LeafInserted(bytes32 indexed treeId, uint256 leaf, uint256 root); + event LeafRemoved(bytes32 indexed treeId, uint256 leaf, uint256 root); - mapping(bytes32 => IncrementalTreeData) public trees; + mapping(bytes32 => IncrementalTreeData) public trees; - function createTree(bytes32 _id, uint8 _depth) external { - require(trees[_id].depth == 0, "BinaryTreeTest: tree already exists"); + function createTree(bytes32 _id, uint8 _depth) external { + require(trees[_id].depth == 0, "BinaryTreeTest: tree already exists"); - trees[_id].init(_depth, 0); + trees[_id].init(_depth, 0); - emit TreeCreated(_id, _depth); - } + emit TreeCreated(_id, _depth); + } - function insertLeaf(bytes32 _treeId, uint256 _leaf) external { - require(trees[_treeId].depth != 0, "BinaryTreeTest: tree does not exist"); + function insertLeaf(bytes32 _treeId, uint256 _leaf) external { + require(trees[_treeId].depth != 0, "BinaryTreeTest: tree does not exist"); - trees[_treeId].insert(_leaf); + trees[_treeId].insert(_leaf); - emit LeafInserted(_treeId, _leaf, trees[_treeId].root); - } + emit LeafInserted(_treeId, _leaf, trees[_treeId].root); + } - function removeLeaf( - bytes32 _treeId, - uint256 _leaf, - uint256[] memory _proofSiblings, - uint8[] memory _proofPathIndices - ) external { - require(trees[_treeId].depth != 0, "BinaryTreeTest: tree does not exist"); + function removeLeaf( + bytes32 _treeId, + uint256 _leaf, + uint256[] memory _proofSiblings, + uint8[] memory _proofPathIndices + ) external { + require(trees[_treeId].depth != 0, "BinaryTreeTest: tree does not exist"); - trees[_treeId].remove(_leaf, _proofSiblings, _proofPathIndices); + trees[_treeId].remove(_leaf, _proofSiblings, _proofPathIndices); - emit LeafRemoved(_treeId, _leaf, trees[_treeId].root); - } + emit LeafRemoved(_treeId, _leaf, trees[_treeId].root); + } } diff --git a/packages/incremental-merkle-tree.sol/contracts/Hashes.sol b/packages/incremental-merkle-tree.sol/contracts/Hashes.sol index d79f4ae..edaedd3 100644 --- a/packages/incremental-merkle-tree.sol/contracts/Hashes.sol +++ b/packages/incremental-merkle-tree.sol/contracts/Hashes.sol @@ -2,9 +2,9 @@ pragma solidity ^0.8.4; library PoseidonT3 { - function poseidon(uint256[2] memory) public pure returns (uint256) {} + function poseidon(uint256[2] memory) public pure returns (uint256) {} } library PoseidonT6 { - function poseidon(uint256[5] memory) public pure returns (uint256) {} + function poseidon(uint256[5] memory) public pure returns (uint256) {} }