Constants
NULL_ID
: A constant representing a null or default identifier.
Structs and Enums
ServiceInfo
- Holds information about a service, including the smart contract address, optional payment token, and amount.
SubscriptionType
- An enum representing different subscription types: None, Daily, Weekly, Monthly.
Service Management
- Trait:
ServiceModule
- Extends the
PaymentsModule
from the payments
module, integrating payment functionalities.
Functions
register_service(args: MultiValueEncoded<MultiValue3<ManagedAddress, Option<EgldOrEsdtTokenIdentifier>, BigUint>>)
- Registers a new service with the provided arguments. It includes service address, optional payment token, and an amount.
Usage
- Service Registration: To register a new service, the
register_service
function is used with necessary arguments, including the service's smart contract address, an optional payment token, and the subscription amount.
Important Notes
- The
ServiceModule
likely interacts with the PaymentsModule
for handling service-related payments.
- The
SubscriptionType
enum suggests a versatile approach to managing various subscription models.