Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MerkleTreeMockUpgradeable

Inherits: Initializable

State Variables

_tree

MerkleTree.Bytes32PushTree private _tree;

root

bytes32 public root;

Functions

__MerkleTreeMock_init

function __MerkleTreeMock_init() internal onlyInitializing;

__MerkleTreeMock_init_unchained

function __MerkleTreeMock_init_unchained() internal onlyInitializing;

setup

function setup(uint8 _depth, bytes32 _zero) public;

push

function push(bytes32 leaf) public;

update

function update(uint256 index, bytes32 oldValue, bytes32 newValue, bytes32[] memory proof) public;

depth

function depth() public view returns (uint256);

nextLeafIndex

function nextLeafIndex() public view returns (uint256);

sides

function sides(uint256 i) public view returns (bytes32);

zeros

function zeros(uint256 i) public view returns (bytes32);

Events

LeafInserted

event LeafInserted(bytes32 leaf, uint256 index, bytes32 root);

LeafUpdated

event LeafUpdated(bytes32 oldLeaf, bytes32 newLeaf, uint256 index, bytes32 root);