diff --git a/contracts/extension/interface/IClaimConditionMultiPhase.sol b/contracts/extension/interface/IClaimConditionMultiPhase.sol index 3023ea57e..c15f7b49b 100644 --- a/contracts/extension/interface/IClaimConditionMultiPhase.sol +++ b/contracts/extension/interface/IClaimConditionMultiPhase.sol @@ -25,10 +25,13 @@ interface IClaimConditionMultiPhase is IClaimCondition { * @param count The total number of phases / claim conditions in the list * of claim conditions. * + * @param conditionHash Mapping from numeric claim condition ID to a unique hash. + * Used in supplyClaimedByWallet mapping below. + * * @param conditions The claim conditions at a given uid. Claim conditions * are ordered in an ascending order by their `startTimestamp`. * - * @param supplyClaimedByWallet Map from a claim condition uid and account to supply claimed by account. + * @param supplyClaimedByWallet Map from a claim condition uid/hash and account to supply claimed by account. */ struct ClaimConditionList { uint256 currentStartId; diff --git a/src/test/sdk/extension/drop/verify-claim/verifyClaim.t.sol b/src/test/sdk/extension/drop/verify-claim/verifyClaim.t.sol index 9a75cb589..d79c30040 100644 --- a/src/test/sdk/extension/drop/verify-claim/verifyClaim.t.sol +++ b/src/test/sdk/extension/drop/verify-claim/verifyClaim.t.sol @@ -31,6 +31,7 @@ contract MyDrop is Drop { function setCondition(ClaimCondition calldata condition, uint256 _conditionId) public { claimCondition.conditions[_conditionId] = condition; + claimCondition.conditionHash[_conditionId] = keccak256(abi.encodePacked(_conditionId, block.number)); } function setSupplyClaimedByWallet(uint256 _conditionId, address _wallet, uint256 _supplyClaimed) public { @@ -407,6 +408,7 @@ contract Drop_VerifyClaim is ExtensionUtilTest { _currency = address(weth); _pricePerToken = 2; _quantity = 1; + vm.expectRevert( abi.encodeWithSelector( Drop.DropClaimExceedLimit.selector, diff --git a/src/test/sdk/extension/upgradeable/drop/verify-claim/verifyClaim.t.sol b/src/test/sdk/extension/upgradeable/drop/verify-claim/verifyClaim.t.sol index 381705795..0cbc92ffc 100644 --- a/src/test/sdk/extension/upgradeable/drop/verify-claim/verifyClaim.t.sol +++ b/src/test/sdk/extension/upgradeable/drop/verify-claim/verifyClaim.t.sol @@ -31,6 +31,9 @@ contract MyDropUpg is Drop { function setCondition(ClaimCondition calldata condition, uint256 _conditionId) public { _dropStorage().claimCondition.conditions[_conditionId] = condition; + _dropStorage().claimCondition.conditionHash[_conditionId] = keccak256( + abi.encodePacked(_conditionId, block.number) + ); } function setSupplyClaimedByWallet(uint256 _conditionId, address _wallet, uint256 _supplyClaimed) public {