Skip to main content

getRoot

Git Source

Returns the root for a given compact range.

This method "bags the peaks" of the compact range, folding in from R2L.

function getRoot(bytes32[] calldata hashes) pure returns (bytes32 root);

Parameters

NameTypeDescription
hashesbytes32[]The hashes of the compact range to calculate the root for.

Returns

NameTypeDescription
rootbytes32The root of the compact range.