Update to latest `merkletreejs` version will break a unit test in `MerkleProof.test.js`
See original GitHub issueI just wanted to let you know that if you update to the latest merkletreejs
version (0.3.2
), the following line will break (at least it did for me 😄):
const badProof = badMerkleTree.getHexProof(badElements[0]);
I realised it since I used the same test setup for my Vyper Snekmake foundry tests. You can fix it by adding the index of 2
. See my commit here: https://github.com/pcaversaccio/snekmate/commit/0f66c3eabbd5e5a8865eab057084749ce1d6c48d:
const badProof = badMerkleTree.getHexProof(badElements[0], 2);
// or the following will produce the same result as well
const badProof = badMerkleTree.getHexProof(badElements[2], 2);
Issue Analytics
- State:
- Created 10 months ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Unit test breaks after dependencies update for Node 16
It seems that it took that locale and used that format. Is interesting that before the upgrade above, I was calling toLocaleString with ......
Read more >The Ultimate Merkle Tree Guide in Solidity
Merkle trees are used everywhere in the world of blockchains. Learn how they work, how to use them yourself and what might be...
Read more >Testing MerkeProof - Support - OpenZeppelin Forum
I 've migrated to hardhat (waffle & ethers) and merkletreejs and I'm having some issue testing the MerkeProof.sol code with addresses as ...
Read more >merkletreejs - npm
Construct Merkle Trees and verify proofs. Latest version: 0.3.9, last published: a month ago. Start using merkletreejs in your project by ...
Read more >Understanding Merkle Trees - Why Use Them, Who Uses ...
Changing the Number of Leaves; Testing an Audit Proof; Testing a ... (like a NoSQL database) where a record is allowed to change...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@miguelmota awesome - just upgraded and can confirm it runs smoothly. Ok, I will upgrade my Merkle proof verification tests to
@openzeppelin/merkle-tree
once my time permits. Closing the issue now as it’s resolved.As frangio pointed out, the oz lib
@openzeppelin/merkle-tree
will supersede merkletreejs since it’ll be more well maintained in the longer term