From d047c071d689572157e69ebf358dd8f6098781a2 Mon Sep 17 00:00:00 2001 From: Vijaykarthik T K <39937989+vijaykarthiktk@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:52:50 +0530 Subject: [PATCH] refactor: removed dead code (#40) (#47) ## Description This pull request removes the verify function in BinaryIMT.sol since it is a private function and is not referenced anywhere in the file, rendering it as dead code. Removing unused code improves the maintainability and readability of the contract ## Related Issue(s) Closes #40 ## Checklist - [x] My code follows the style guidelines of this project. - [x] I have performed a self-review of my code. - [x] My changes generate no new warnings. - [x] I have run `yarn format` and `yarn compile` without getting any errors. - [x] New and existing unit tests pass locally with my changes. --- packages/imt/contracts/BinaryIMT.sol | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/imt/contracts/BinaryIMT.sol b/packages/imt/contracts/BinaryIMT.sol index e14a16f..8f18fbc 100644 --- a/packages/imt/contracts/BinaryIMT.sol +++ b/packages/imt/contracts/BinaryIMT.sol @@ -40,13 +40,4 @@ library BinaryIMT { ) public { InternalBinaryIMT._remove(self, leaf, proofSiblings, proofPathIndices); } - - function verify( - BinaryIMTData storage self, - uint256 leaf, - uint256[] calldata proofSiblings, - uint8[] calldata proofPathIndices - ) private view returns (bool) { - return InternalBinaryIMT._verify(self, leaf, proofSiblings, proofPathIndices); - } }