Skip to content

Feat/usdc payment validation - #282

Merged
truthixify merged 12 commits into
DistinctCodes:mainfrom
jayteemoney:feat/usdc-payment-validation
Oct 1, 2025
Merged

Feat/usdc payment validation#282
truthixify merged 12 commits into
DistinctCodes:mainfrom
jayteemoney:feat/usdc-payment-validation

Conversation

@jayteemoney

@jayteemoney jayteemoney commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

feat: Add USDC payment validation for subscription system

closes #220

Implemented full USDC payment validation for subscription creation.

Added new subscription.rs module with payment verification logic.

Integrated subscription management into the main contract interface.

Introduced 7 new error types in errors.rs for payment validation failures.

Extended types.rs with a new Subscription contract type.

Added persistent storage for subscription and USDC configuration.

Comprehensive test suite: 9 new payment validation tests + all existing 27 passing.

Covered edge cases and error scenarios for USDC validation.

Updated Cargo.lock to resolve dependency conflicts.

Provides a secure foundation for subscription-based services with USDC support.

jayteemoney and others added 5 commits September 29, 2025 14:23
- Add subscription module with payment validation logic
- Implement validate_payment function with USDC token verification
- Integrate payment validation into create_subscription workflow
- Add comprehensive error handling for payment scenarios
- Include full test coverage for payment validation features
- Ensure USDC contract address validation and storage
- Support subscription creation with validated USDC payments

All tests passing and compilation successful.
- Update serde from 1.0.227 to 1.0.228
- Update quote from 1.0.40 to 1.0.41
- Update ref-cast and ref-cast-impl to 1.0.25
- Update cc from 1.2.38 to 1.2.39

Resolves merge conflicts with main branch.
@vercel

vercel Bot commented Sep 29, 2025

Copy link
Copy Markdown

@jayteemoney is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@truthixify

Copy link
Copy Markdown
Contributor

@jayteemoney

Currently the CI is failing, can you fix the CI, once it passes, I’ll merge your PR.

@truthixify

Copy link
Copy Markdown
Contributor

Just make the format check pass and your Pr will be merged.

@jayteemoney

jayteemoney commented Oct 1, 2025 via email

Copy link
Copy Markdown
Contributor Author

@truthixify

Copy link
Copy Markdown
Contributor

It’s still failing for the format check, you can run cargo fmt

@jayteemoney

Copy link
Copy Markdown
Contributor Author

i ran cargo fmt in the contract folder and it was successful. sorry for all inconveniences

@truthixify

Copy link
Copy Markdown
Contributor

Oh, did you fix thr clippy issues also?

@jayteemoney also, did you allow maintainers to edit?

I can help fix the issue.

@jayteemoney

Copy link
Copy Markdown
Contributor Author

i think maintainers can edit by default and to be honest i wil need you to help fix the issue

@truthixify

Copy link
Copy Markdown
Contributor

Hey @jayteemoney

It's all green now, thank you for your contribution.

@truthixify
truthixify merged commit e791b4e into DistinctCodes:main Oct 1, 2025
4 of 5 checks passed
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.

[CONTRACT] Add Payment Validation for Subscriptions

2 participants