BBSubscriptionsFactory

Functions

deploySubscriptions

function deploySubscriptions(
    address currency
) external override returns (address)

Deploy a BBSubscriptions contract for an ERC20 token.

Parameters

Name
Type
Description

currency

address

Address of an ERC20 token (eg WBTC)

Return Values

Name
Type
Description

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

Name
Type
Description

currency

address

ERC20 token to inquire about

Return Values

Name
Type
Description

isSubscriptionsDeployed

bool

True if ERC20 has a deployed BBSubscriptions contract

getDeployedSubscriptions

Get the BBSubscriptions contract for a given ERC20.

Parameters

Name
Type
Description

currency

address

ERC20 token

Return Values

Name
Type
Description

deployedSubscriptions

address

BBSubscriptions contract address for the given currency

getGracePeriod

Gets the amount of time between when a subscription expires, and when a subscriber no longer has access to a profiles content.

Return Values

Name
Type
Description

gracePeriod

uint256

getContributionBounds

TODO

Return Values

Name
Type
Description

lower

uint256

upper

uint256

getSubscriptionCurrency

TODO

Parameters

Name
Type
Description

profileId

uint256

tierId

uint256

account

address

Return Values

Name
Type
Description

currency

address

createSubscriptionProfile

TODO

Parameters

Name
Type
Description

profileId

uint256

tierSetId

uint256

contribution

uint256

setContribution

TODO

Parameters

Name
Type
Description

profileId

uint256

contribution

uint256

getSubscriptionProfile

Returns a profiles subscription profile.

Parameters

Name
Type
Description

profileId

uint256

Profile ID of the subscription profile

Return Values

Name
Type
Description

tierSetId

uint256

The subscription profiles tier set ID

contribution

uint256

The subscription profiles BackedBy treasury contribution

isSubscriptionProfileCreated

Returns true if a profile has created a subscription profile.

Parameters

Name
Type
Description

profileId

uint256

Profile ID of the subscription profile

Return Values

Name
Type
Description

created

bool

State of the subscription profiles existance

isSubscriptionActive

Returns true if an address is subscribed to a profile's tier.

Parameters

Name
Type
Description

profileId

uint256

Profile ID of the subscription

tierId

uint256

Tier ID of the subscription

account

address

Address of the subscriber

Return Values

Name
Type
Description

active

bool

Subscription active state

Last updated