-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62989ce
commit 2eeaf00
Showing
5 changed files
with
40 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
pragma solidity 0.8.17; | ||
|
||
// SPDX-License-Identifier: Apache2 | ||
|
||
// Outcome of a successfully verified merkle-patricia proof | ||
struct StorageValue { | ||
// the storage key | ||
bytes key; | ||
// the encoded value | ||
bytes value; | ||
} | ||
|
||
/// @title A representation of a Merkle tree node | ||
struct Node { | ||
// Distance of the node to the leftmost node | ||
uint256 k_index; | ||
// A hash of the node itself | ||
bytes32 node; | ||
} | ||
|
||
|
||
/// @title A representation of a MerkleMountainRange leaf | ||
struct MmrLeaf { | ||
// the leftmost index of a node | ||
uint256 k_index; | ||
// The position in the tree | ||
uint256 leaf_index; | ||
// The hash of the position in the tree | ||
bytes32 hash; | ||
} | ||
|
||
struct Iterator { | ||
uint256 offset; | ||
bytes32[] data; | ||
} |