From 113c4cbff49365490a490c7eb86721c58016b0d4 Mon Sep 17 00:00:00 2001 From: call-by Date: Mon, 22 Jul 2024 11:15:11 -0400 Subject: [PATCH] fix: merkleize typo --- src/core/ExoCapsule.sol | 4 ++-- src/libraries/ValidatorContainer.sol | 2 +- src/libraries/WithdrawalContainer.sol | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/ExoCapsule.sol b/src/core/ExoCapsule.sol index dfb40735..1c969a3b 100644 --- a/src/core/ExoCapsule.sol +++ b/src/core/ExoCapsule.sol @@ -267,7 +267,7 @@ contract ExoCapsule is ReentrancyGuardUpgradeable, ExoCapsuleStorage, IExoCapsul view { bytes32 beaconBlockRoot = getBeaconBlockRoot(proof.beaconBlockTimestamp); - bytes32 validatorContainerRoot = validatorContainer.merklelizeValidatorContainer(); + bytes32 validatorContainerRoot = validatorContainer.merkleizeValidatorContainer(); bool valid = validatorContainerRoot.isValidValidatorContainerRoot( proof.validatorContainerRootProof, proof.validatorIndex, @@ -285,7 +285,7 @@ contract ExoCapsule is ReentrancyGuardUpgradeable, ExoCapsuleStorage, IExoCapsul BeaconChainProofs.WithdrawalProof calldata proof ) internal view { // To-do check withdrawalContainer length is valid - bytes32 withdrawalContainerRoot = withdrawalContainer.merklelizeWithdrawalContainer(); + bytes32 withdrawalContainerRoot = withdrawalContainer.merkleizeWithdrawalContainer(); bool valid = withdrawalContainerRoot.isValidWithdrawalContainerRoot(proof); if (!valid) { revert InvalidWithdrawalContainer(withdrawalContainer.getValidatorIndex()); diff --git a/src/libraries/ValidatorContainer.sol b/src/libraries/ValidatorContainer.sol index 704481f1..0938bc9c 100644 --- a/src/libraries/ValidatorContainer.sol +++ b/src/libraries/ValidatorContainer.sol @@ -53,7 +53,7 @@ library ValidatorContainer { return validatorContainer[7].fromLittleEndianUint64(); } - function merklelizeValidatorContainer(bytes32[] calldata validatorContainer) internal pure returns (bytes32) { + function merkleizeValidatorContainer(bytes32[] calldata validatorContainer) internal pure returns (bytes32) { bytes32[] memory leaves = validatorContainer; for (uint256 i; i < MERKLE_TREE_HEIGHT; i++) { bytes32[] memory roots = new bytes32[](leaves.length / 2); diff --git a/src/libraries/WithdrawalContainer.sol b/src/libraries/WithdrawalContainer.sol index e6d26b83..1a2159ae 100644 --- a/src/libraries/WithdrawalContainer.sol +++ b/src/libraries/WithdrawalContainer.sol @@ -39,7 +39,7 @@ library WithdrawalContainer { return withdrawalContainer[3].fromLittleEndianUint64(); } - function merklelizeWithdrawalContainer(bytes32[] calldata withdrawalContainer) internal pure returns (bytes32) { + function merkleizeWithdrawalContainer(bytes32[] calldata withdrawalContainer) internal pure returns (bytes32) { bytes32[] memory leaves = withdrawalContainer; for (uint256 i; i < MERKLE_TREE_HEIGHT; i++) { bytes32[] memory roots = new bytes32[](leaves.length / 2);