Comment on page
BBSubscriptionsFactory
function deploySubscriptions(
address currency
) external override returns (address)
Deploy a BBSubscriptions contract for an ERC20 token.
Name | Type | Description |
---|---|---|
currency | address | Address of an ERC20 token (eg WBTC) |
Name | Type | Description |
---|---|---|
deployedSubscriptions | address | Address of the new deployed BBSubscriptions contract. |
function isSubscriptionsDeployed(
address currency
) external view override returns (bool)
Check if a currency has been used to deploy a BBSubscriptions contract.
Name | Type | Description |
---|---|---|
currency | address | ERC20 token to inquire about |
Name | Type | Description |
---|---|---|
isSubscriptionsDeployed | bool | True if ERC20 has a deployed BBSubscriptions contract |
function getDeployedSubscriptions(
address currency
) external view override returns (address)
Get the BBSubscriptions contract for a given ERC20.
Name | Type | Description |
---|---|---|
currency | address | ERC20 token |
Name | Type | Description |
---|---|---|
deployedSubscriptions | address | BBSubscriptions contract address for the given currency |
function getGracePeriod(
) external pure returns (uint256 gracePeriod)
Gets the amount of time between when a subscription expires, and when a subscriber no longer has access to a profiles content.
Name | Type | Description |
---|---|---|
gracePeriod | uint256 | |
function getContributionBounds(
) external pure returns (uint256 lower, uint256 upper)
TODO
Name | Type | Description |
---|---|---|
lower | uint256 | |
upper | uint256 | |
function getSubscriptionCurrency(
uint256 profileId,
uint256 tierId,
address account
) external view returns (address currency)
TODO
Name | Type | Description |
---|---|---|
profileId | uint256 | |
tierId | uint256 | |
account | address | |
Name | Type | Description |
---|---|---|
currency | address | |
function createSubscriptionProfile(
uint256 profileId,
uint256 tierSetId,
uint256 contribution
) external
TODO
Name | Type | Description |
---|---|---|
profileId | uint256 | |
tierSetId | uint256 | |
contribution | uint256 | |
function setContribution(
uint256 profileId,
uint256 contribution
) external
TODO
Name | Type | Description |
---|---|---|
profileId | uint256 | |
contribution | uint256 | |
function getSubscriptionProfile(
uint256 profileId
) external view returns (uint256 tierSetId, uint256 contribution)
Returns a profiles subscription profile.
Name | Type | Description |
---|---|---|
profileId | uint256 | Profile ID of the subscription profile |
Name | Type | Description |
---|---|---|
tierSetId | uint256 | The subscription profiles tier set ID |
contribution | uint256 | The subscription profiles BackedBy treasury contribution |
function isSubscriptionProfileCreated(
uint256 profileId
) external view returns (bool created)
Returns true if a profile has created a subscription profile.
Name | Type | Description |
---|---|---|
profileId | uint256 | Profile ID of the subscription profile |
Name | Type | Description |
---|---|---|
created | bool | State of the subscription profiles existance |
function isSubscriptionActive(
uint256 profileId,
uint256 tierId,
address account
) external view returns (bool active)
Returns true if an address is subscribed to a profile's tier.
Name | Type | Description |
---|---|---|
profileId | uint256 | Profile ID of the subscription |
tierId | uint256 | Tier ID of the subscription |
account | address | Address of the subscriber |
Name | Type | Description |
---|---|---|
active | bool | Subscription active state |
Last modified 10mo ago