ethereum / py-trie

Python library which implements the Ethereum Trie structure.
MIT License
105 stars 52 forks source link

Add `leaf_hash` function to `SparseMerkleTree` #149

Open antazoey opened 9 months ago

antazoey commented 9 months ago

What feature should we add?

The equivalent of https://github.com/OpenZeppelin/merkle-tree/blob/master/src/standard.ts#L114-L116

antazoey commented 9 months ago

It looks like the data is abi encoded before keccaked: https://github.com/OpenZeppelin/merkle-tree/blob/master/src/utils/standard-leaf-hash.ts#L7