-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c548aef
commit ca4e6d4
Showing
5 changed files
with
57 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
/// @title Discount Validator Interface | ||
/// | ||
/// @notice Common interface which all Discount Validators must implement. | ||
/// The logic specific to each integration must ultimately be consumable as the `bool` returned from | ||
/// `isValidDiscountRegistration`. | ||
interface IDiscountValidator { | ||
/// @notice Required implementation for compatibility with IDiscountValidator. | ||
/// | ||
/// @dev Each implementation will have unique requirements for the data necessary to perform | ||
/// a meaningul validation. Implementations must describe here how to pack relevant `validationData`. | ||
/// Ex: `bytes validationData = abi.encode(bytes32 key, bytes32[] proof)` | ||
/// | ||
/// @param claimer the discount claimer's address. | ||
/// @param validationData opaque bytes for performing the validation. | ||
/// | ||
/// @return `true` if the validation data provided is determined to be valid for the specified claimer, else `false`. | ||
function isValidDiscountRegistration(address claimer, bytes calldata validationData) external returns (bool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters