You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,7 +4,7 @@ This directory contains the core smart contracts for the TalentPlus subscription
4
4
5
5
## Overview
6
6
7
-
The TalentPlus system enables trusted signers to purchase subscriptions for users using TALENT tokens, with flexible subscription modelsand administrative capabilities for custom subscription management. Trusted signers can purchase subscriptions for any wallet address, enabling gift subscriptions and corporate subscription management.
7
+
The TalentPlus system enables anyone to purchase subscriptions for users using ETH payments, with flexible subscription models, TALENT token-based discounts (including vault staking), and administrative capabilities for custom subscription management. Users can purchase subscriptions for any wallet address, enabling gift subscriptions and corporate subscription management.
8
8
9
9
## Contracts
10
10
@@ -15,6 +15,8 @@ The core subscription management contract that handles subscription models and u
15
15
#### Key Features
16
16
17
17
-**Subscription Model Management**: Create, update, and deactivate subscription models
18
+
-**TALENT Token Integration**: Check TALENT token balances and vault staking for discount eligibility
19
+
-**Dynamic Discount System**: Apply discounts based on combined TALENT holdings (balance + vault staking)
18
20
-**User Subscription Management**: Add, upgrade, and extend user subscriptions
19
21
-**Custom Expiration Support**: Administrative function to set custom expiration times
20
22
-**Access Control**: Owner and trusted signer permissions
@@ -23,20 +25,22 @@ The core subscription management contract that handles subscription models and u
-`addUserSubscription(address wallet, string subscriptionSlug)` - Standard subscription with model-based duration
32
-
-`addUserSubscriptionWithExpiration(address wallet, uint256 expirationTime)` - Custom expiration time (sets slug as "custom")
33
+
-`addUserSubscription(address wallet, string subscriptionSlug, address payer, uint256 pricePaid)` - Standard subscription with model-based duration. `payer` is who paid, `pricePaid` is the ETH amount paid.
34
+
-`addUserSubscriptionWithExpiration(address wallet, uint256 expirationTime)` - Custom expiration time (sets slug as "custom"). For these admin-set subscriptions, `payer` is `msg.sender` and `pricePaid` is `0` in the emitted events.
-`getSubscriptionModel(string subscriptionSlug)` - Returns model details including discount info
43
+
-`calculateDiscountedPrice(string subscriptionSlug, address wallet)` - Calculates final price with discount applied based on TALENT balance + vault staking
The payment and subscription creation contract that handles TALENT token payments and integrates with TalentPlusSubscription. Only trusted signers can call the subscription functions.
69
+
The payment and subscription creation contract that handles ETH payments and integrates with TalentPlusSubscription. Anyone can call the subscription functions.
66
70
67
71
#### Key Features
68
72
69
-
-**TALENT Token Integration**: Handles ERC20 token payments for subscriptions
70
-
-**Direct Access Control**: Only trusted signers can create subscriptions
71
-
-**Dynamic Pricing**: Fetches subscription costs from TalentPlusSubscription contract
72
-
-**Gift Subscriptions**: Trusted signers can purchase subscriptions for any wallet address
73
+
-**ETH Payment Integration**: Handles native ETH payments for subscriptions
74
+
-**TALENT-Based Discounts**: Automatically applies discounts based on TALENT token holdings and vault staking
75
+
-**Direct Access**: Anyone can create subscriptions by calling the subscribe function
76
+
-**Dynamic Pricing**: Fetches subscription costs and applies discounts from TalentPlusSubscription contract
77
+
-**Gift Subscriptions**: Anyone can purchase subscriptions for any wallet address
0 commit comments