SubscriptionManager
Last updated
Was this helpful?
Last updated
Was this helpful?
Allows a vendor to periodically charge subscribers for a subscription service.
Mapping of subscriber address to next payment due timestamp.
Mapping to track subscription status.
Modifier to restrict function access to the vendor.
Parameters
_token
IERC20
The ERC20 token address for subscription payments.
_subscriptionFee
uint256
Fee per period (in token smallest units).
Called by a user to initialize their subscription.
Called by the vendor to charge a subscriber.
Parameters
subscriber
address
The address of the subscriber to be charged.
Utility function for vendor to update the subscription fee.
Parameters
newFee
uint256
New fee per period.
Called by a user to unsubscribe from the subscription.
Emitted when a subscriber is initially enrolled.
Emitted when a subscriber is charged.