diff --git a/contracts/BaseEscrowFactory.sol b/contracts/BaseEscrowFactory.sol index aa36f42..b499964 100644 --- a/contracts/BaseEscrowFactory.sol +++ b/contracts/BaseEscrowFactory.sol @@ -77,7 +77,7 @@ abstract contract BaseEscrowFactory is IEscrowFactory, ResolverValidationExtensi uint256 partsAmount = uint256(extraDataArgs.hashlockInfo) >> 240; if (partsAmount < 2) revert InvalidSecretsAmount(); bytes32 key = keccak256(abi.encodePacked(orderHash, uint240(uint256(extraDataArgs.hashlockInfo)))); - LastValidated memory validated = lastValidated[key]; + ValidationData memory validated = lastValidated[key]; hashlock = validated.leaf; uint256 calculatedIndex = (order.makingAmount - remainingMakingAmount + makingAmount - 1) * partsAmount / order.makingAmount; if ( diff --git a/contracts/MerkleStorageInvalidator.sol b/contracts/MerkleStorageInvalidator.sol index ce27fb6..497d108 100644 --- a/contracts/MerkleStorageInvalidator.sol +++ b/contracts/MerkleStorageInvalidator.sol @@ -22,7 +22,7 @@ contract MerkleStorageInvalidator is IMerkleStorageInvalidator, ITakerInteractio address private immutable _LIMIT_ORDER_PROTOCOL; /// @notice See {IMerkleStorageInvalidator-lastValidated}. - mapping(bytes32 => LastValidated) public lastValidated; + mapping(bytes32 key => ValidationData) public lastValidated; /// @notice Only limit order protocol can call this contract. modifier onlyLOP() { @@ -63,6 +63,6 @@ contract MerkleStorageInvalidator is IMerkleStorageInvalidator, ITakerInteractio if (takerData.idx < lastValidated[key].index) revert InvalidIndex(); bytes32 rootCalculated = takerData.proof.processProofCalldata(keccak256(abi.encodePacked(takerData.idx, takerData.secretHash))); if (uint240(uint256(rootCalculated)) != rootShortened) revert InvalidProof(); - lastValidated[key] = LastValidated(takerData.idx + 1, takerData.secretHash); + lastValidated[key] = ValidationData(takerData.idx + 1, takerData.secretHash); } } diff --git a/contracts/interfaces/IMerkleStorageInvalidator.sol b/contracts/interfaces/IMerkleStorageInvalidator.sol index 72273d6..9fad256 100644 --- a/contracts/interfaces/IMerkleStorageInvalidator.sol +++ b/contracts/interfaces/IMerkleStorageInvalidator.sol @@ -7,7 +7,7 @@ pragma solidity 0.8.23; * @notice Interface to invalidate hashed secrets from an order that supports multiple fills. */ interface IMerkleStorageInvalidator { - struct LastValidated { + struct ValidationData { uint256 index; bytes32 leaf; }