Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6b079ee
Add a (complete) MerkleTree structure
Amxx Aug 14, 2022
42c695b
optimize array access & remove depth/length constrains
Amxx Aug 14, 2022
ca83cde
gas optimization
Amxx Aug 14, 2022
f4f46ca
limit tree depth to 255 to avoid issues (255 is enough for any realis…
Amxx Aug 14, 2022
af7cb9c
fix lint
Amxx Aug 14, 2022
45eae37
reason
Amxx Aug 14, 2022
ac648c6
coverage
Amxx Aug 14, 2022
1b184c9
comments
Amxx Aug 14, 2022
4863418
documentation & changelog entry
Amxx Aug 16, 2022
3c19dcf
Merge branch 'master' into structure/merkletree
Amxx Dec 13, 2023
9fc7f31
update
Amxx Dec 13, 2023
652c8a1
add changeset
Amxx Dec 13, 2023
c74ab55
fix lint
Amxx Dec 14, 2023
a9932c9
fix lint
Amxx Dec 14, 2023
d8bdfd0
fix codespell
Amxx Dec 14, 2023
4d0ed52
Merge branch 'master' into structure/merkletree
Amxx Jan 4, 2024
b131354
update @openzeppelin/merkle-tree dependency
Amxx Jan 28, 2024
6422af6
fix lint
Amxx Jan 28, 2024
3ab0d21
Merge branch 'master' into structure/merkletree
Amxx Feb 5, 2024
5639d7c
up
Amxx Feb 5, 2024
24c829a
minimize changes
Amxx Feb 5, 2024
f954a98
Panic with RESOURCE_ERROR when inserting in a full tree
Amxx Feb 5, 2024
acdc6a9
Merge branch 'master' into structure/merkletree
Amxx Feb 6, 2024
cebdc2a
improve coverage
Amxx Feb 6, 2024
d4ced94
test looparound property of memory arrays
Amxx Feb 6, 2024
a3a813c
rename initialize → setUp
Amxx Feb 7, 2024
ec05d19
Update contracts/utils/structs/MerkleTree.sol
Amxx Feb 7, 2024
8ecc790
Merge branch 'master' into structure/merkletree
Amxx Feb 12, 2024
ec3d96b
fix lint
Amxx Feb 12, 2024
bcc0667
cleanup
Amxx Feb 12, 2024
b50ebee
Merge branch 'master' into structure/merkletree
Amxx Feb 16, 2024
5b15205
remove root history from the MerkleTree structure
Amxx Feb 19, 2024
b390790
Add Hashes.sol
Amxx Feb 19, 2024
e331674
fix-lint
Amxx Feb 19, 2024
91f7057
rename to reflect removal of history
Amxx Feb 19, 2024
088fa8c
rename setUp → setup
Amxx Feb 19, 2024
2d869b7
doc
Amxx Feb 20, 2024
567cd3e
Update contracts/utils/structs/MerkleTree.sol
Amxx Feb 20, 2024
a13237a
Update MerkleTree.sol
Amxx Feb 20, 2024
03bea3e
Update changesets and fix some comments
ernestognw Feb 21, 2024
c475bad
Simplify
ernestognw Feb 21, 2024
6a9e873
Add Merkle Tree to the docs
ernestognw Feb 21, 2024
1e59539
Remove merkletree.test.js
ernestognw Feb 21, 2024
051107b
Recover MerkleTree.test.js
ernestognw Feb 21, 2024
a1dd158
prefix variables with underscore to mark them as private (similar do …
Amxx Feb 21, 2024
7a21c4e
test reseting the tree using setup
Amxx Feb 21, 2024
01c2879
rename hashing functions
Amxx Feb 21, 2024
2494680
return index and root when inserting a leaf
Amxx Feb 21, 2024
0a2bfce
rename structure and functions
Amxx Feb 21, 2024
08c9a3c
Apply PR suggestions
ernestognw Mar 5, 2024
31712fb
Update contracts/utils/cryptography/Hashes.sol
Amxx Mar 5, 2024
55853be
rename the standard node hash
Amxx Mar 6, 2024
eca27fc
fix lint
Amxx Mar 6, 2024
eca9085
Fix NatSpec weird error
ernestognw Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Merkle Tree to the docs
  • Loading branch information
ernestognw committed Feb 21, 2024
commit 6a9e8732c64d4025fc40831a002c692359434d77
3 changes: 3 additions & 0 deletions contracts/utils/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Miscellaneous contracts and libraries containing utility functions you can use t
* {EnumerableSet}: Like {EnumerableMap}, but for https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets]. Can be used to store privileged accounts, issued IDs, etc.
* {DoubleEndedQueue}: An implementation of a https://en.wikipedia.org/wiki/Double-ended_queue[double ended queue] whose values can be removed added or remove from both sides. Useful for FIFO and LIFO structures.
* {Checkpoints}: A data structure to store values mapped to an strictly increasing key. Can be used for storing and accessing values over time.
* {MerkleTree}: A library with https://wikipedia.org/wiki/Merkle_Tree[Merkle Tree] data structures and helper functions.
* {Create2}: Wrapper around the https://blog.openzeppelin.com/getting-the-most-out-of-create2/[`CREATE2` EVM opcode] for safe use without having to deal with low-level assembly.
* {Address}: Collection of functions for overloading Solidity's https://docs.soliditylang.org/en/latest/types.html#address[`address`] type.
* {Arrays}: Collection of functions that operate on https://docs.soliditylang.org/en/latest/types.html#arrays[`arrays`].
Expand Down Expand Up @@ -91,6 +92,8 @@ Ethereum contracts have no native concept of an interface, so applications must

{{Checkpoints}}

{{MerkleTree}}

== Libraries

{{Create2}}
Expand Down