BBSubscriptions
Last updated
Last updated
For each ERC20 token accepted by the protocol, there is a corresponding BBSubscriptions contract.
Create a subscription to a Profile at a specific Tier.
Unsubscribe from a Profile
Generate input for performUpkeep
PerformUpkeep is a standard AutomationCompatibleInterface
function. Input can be automatically generated by the checkUpkeep() function or manually built.
Sends the ERC20 token balance the instance of BBSubscriptions handles to the treasury of the BBSubscriptionsFactory.
Get the subscription data on an account for a given profile and tier.
Get the details of a subscription based on an ID.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
profileId
uint256
Profile to create a subscription to
tierId
uint256
Subscription Tier to subscribe to.
subscriptionId
uint256
The ID of the newly created subscription
profileId
uint256
Profile to unsubscribe from
tierId
uint256
Tier to unsubscribe from
checkData
bytes
api.encoded input
lowerBound
uint256
Starting subscriptionId to check for renewal
upperBoard
uint256
Ending subscriptionId to check for renewal
minRenews
uint256
Minimum number of renewals to find
maxRenews
uint256
Maximum number of renewals to find
refundReceiver
address
Account to receive the gas refund from performUpkeep.
upkeepNeeded
bool
Returns true if the number of subscriptions to renew is greater than minRenews.
performData
bytes
Data to pass thru to performUpkeep if upkeepNeeded is true.
renewIndexes
uint256[]
Subscription IDs to renew
refundReceiver
address
Account to send gas refund to
renewalData
bytes
abi.encoded parameters
renewIndexes
uint256[]
Subscriber IDs to renew
refundReceiver
address
Address to send gas refund to
profileId
uint256
Profile to look at
tierId
uint256
Tier to look at
subscriber
address
Account to look for
subscriptionId
uint256
Subscription ID
price
uint256
Monthly price of subscription
expiration
uint256
Unix timestamp of the when the subscription will expire
cancelled
bool
Whether or not the subscription is cancelled
subscriptionId
uint256
ID of the subscription to return
profileId
uint256
ID of the profile
tierId
uint256
ID of the subscription tier
subscriber
address
Address of the subscriber
price
uint256
Monthly price of subscription
expiration
uint256
Unix timestamp of the when the subscription will expire
cancelled
bool
Whether or not the subscription is cancelled