Fix various documentation errors (#4601)

This commit is contained in:
Francisco
2023-09-14 17:32:47 -03:00
committed by GitHub
parent d555464c53
commit af06fdcfd4
9 changed files with 28 additions and 16 deletions

View File

@ -211,10 +211,16 @@ library MerkleProof {
}
}
/**
* @dev Sorts the pair (a, b) and hashes the result.
*/
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
/**
* @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
*/
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
/// @solidity memory-safe-assembly
assembly {