BBSubscriptionsFactory
Functions
deploySubscriptions
function deploySubscriptions(
address currency
) external override returns (address)
Deploy a BBSubscriptions contract for an ERC20 token.
Parameters
currency
address
Address of an ERC20 token (eg WBTC)
Return Values
deployedSubscriptions
address
Address of the new deployed BBSubscriptions contract.
isSubscriptionsDeployed
function isSubscriptionsDeployed(
address currency
) external view override returns (bool)
Check if a currency has been used to deploy a BBSubscriptions contract.
Parameters
currency
address
ERC20 token to inquire about
Return Values
isSubscriptionsDeployed
bool
True if ERC20 has a deployed BBSubscriptions contract
getDeployedSubscriptions
function getDeployedSubscriptions(
address currency
) external view override returns (address)
Get the BBSubscriptions contract for a given ERC20.
Parameters
currency
address
ERC20 token
Return Values
deployedSubscriptions
address
BBSubscriptions contract address for the given currency
getGracePeriod
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.
Return Values
gracePeriod
uint256
getContributionBounds
function getContributionBounds(
) external pure returns (uint256 lower, uint256 upper)
TODO
Return Values
lower
uint256
upper
uint256
getSubscriptionCurrency
function getSubscriptionCurrency(
uint256 profileId,
uint256 tierId,
address account
) external view returns (address currency)
TODO
Parameters
profileId
uint256
tierId
uint256
account
address
Return Values
currency
address
createSubscriptionProfile
function createSubscriptionProfile(
uint256 profileId,
uint256 tierSetId,
uint256 contribution
) external
TODO
Parameters
profileId
uint256
tierSetId
uint256
contribution
uint256
setContribution
function setContribution(
uint256 profileId,
uint256 contribution
) external
TODO
Parameters
profileId
uint256
contribution
uint256
getSubscriptionProfile
function getSubscriptionProfile(
uint256 profileId
) external view returns (uint256 tierSetId, uint256 contribution)
Returns a profiles subscription profile.
Parameters
profileId
uint256
Profile ID of the subscription profile
Return Values
tierSetId
uint256
The subscription profiles tier set ID
contribution
uint256
The subscription profiles BackedBy treasury contribution
isSubscriptionProfileCreated
function isSubscriptionProfileCreated(
uint256 profileId
) external view returns (bool created)
Returns true if a profile has created a subscription profile.
Parameters
profileId
uint256
Profile ID of the subscription profile
Return Values
created
bool
State of the subscription profiles existance
isSubscriptionActive
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.
Parameters
profileId
uint256
Profile ID of the subscription
tierId
uint256
Tier ID of the subscription
account
address
Address of the subscriber
Return Values
active
bool
Subscription active state
Last updated