Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coupon discount validator #96

Merged
merged 7 commits into from
Oct 17, 2024
Merged

Add coupon discount validator #96

merged 7 commits into from
Oct 17, 2024

Conversation

stevieraykatz
Copy link
Collaborator

@stevieraykatz stevieraykatz commented Oct 11, 2024

We are adding a coupon discount validator which relies on a backend service to sign valid coupons for end users. We leverage EIP-191 signing to validate that the signature is valid for a specific user with a unique coupon id.

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Oct 11, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

src/L2/discounts/CouponDiscountValidator.sol Dismissed Show dismissed Hide dismissed
@stevieraykatz stevieraykatz marked this pull request as ready for review October 14, 2024 16:23
cb-elileers
cb-elileers previously approved these changes Oct 14, 2024
Copy link
Collaborator

@cb-elileers cb-elileers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for posterity: Solady's ECDSA recover function reverts if the signature returns 0, so we don't need to do 0 address validation when setting signer.

@cb-heimdall cb-heimdall dismissed cb-elileers’s stale review October 14, 2024 20:49

Approved review 2367507115 from cb-elileers is now dismissed due to new commit. Re-request for approval.

@stevieraykatz stevieraykatz merged commit edbe86f into main Oct 17, 2024
4 checks passed
@stevieraykatz stevieraykatz deleted the add-coupon-discounts branch October 17, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants