semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

define a const variable for max_depth

Open 0xDatapunk opened this issue 1 year ago • 1 comments

It is better to define a const for 12

https://github.com/semaphore-protocol/semaphore/blob/8eb19e83fda62644872b2fcfbd85011d3b2c21e2/packages/contracts/contracts/Semaphore.sol#L139

0xDatapunk avatar Mar 06 '24 15:03 0xDatapunk

since 12 will be updated as max depth is increased, it's better to define it as a const variable. It highlights the use of the constant and there is lower chances of forgetting it in case a modification is needed.

0xbok avatar Mar 07 '24 16:03 0xbok