Comment on page
BBTiers
function createTiers(
uint256 profileId,
uint256[] calldata prices,
string[] calldata cids,
bool[] memory deprecated,
address[] calldata supportedCurrencies,
uint256[] calldata priceMultipliers
) external returns (uint256 tierSetId)
Creates a set of tiers
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile to create the tier set in |
prices | uint256[] | The base prices of each tier |
cids | string[] | The CID's of each tier |
deprecated | bool[] | The deprecation state of each tier |
supportedCurrencies | address[] | Contract address of each supported ERC20 token |
priceMultipliers | uint256[] | Price multiplier of each supported ERC20 token |
Name | Type | Description |
---|---|---|
tierSetId | uint256 | The ID of the created tier set |
function editTiers(
uint256 profileId,
uint256 tierSetId,
uint256[] calldata prices,
string[] calldata cids,
bool[] memory deprecated
) external
Set the values of a set of tiers
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile to edit the tier set in |
tierSetId | uint256 | The ID of the tier set to edit |
prices | uint256[] | New prices of each tier |
cids | string[] | New CID's of each tier |
deprecated | bool[] | New deprecated state of each tier |
function setSupportedCurrencies(
uint256 profileId,
uint256 tierSetId,
address[] calldata supportedCurrencies,
uint256[] calldata priceMultipliers
) external
Set a tier sets supported ERC20 tokens for payment
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile to set the supported currencies in |
tierSetId | uint256 | Tier set ID to set the supported currencies in |
supportedCurrencies | address[] | The ERC20 tokens to support |
priceMultipliers | uint256[] | The price multiplier of each ERC20 token |
function getTier(
uint256 profileId,
uint256 tierSetId,
uint256 tierId,
address currency
) external view returns (string memory cid, uint256 price, bool deprecated)
Returns an existing tier
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile that owns the tier |
tierSetId | uint256 | ID of the tier set the tier is in |
tierId | uint256 | ID of the tier to return |
currency | address | ERC20 token contract address to price the tier in |
Name | Type | Description |
---|---|---|
cid | string | Returned CID of a tier |
price | uint256 | Returned price of a tier |
deprecated | bool | Returned deprecated state of a tier |
function getTierSet(
uint256 profileId,
uint256 tierSetId
) external view returns (uint256[] memory prices, string[] memory cids, bool[] memory deprecated)
Returns an existing set of tiers
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile that owns the tier set |
tierSetId | uint256 | ID if the tier set to return |
Name | Type | Description |
---|---|---|
prices | uint256[] | Returned base price of each tier in a tier set |
cids | string[] | Returned CID of each tier in a tier set |
deprecated | bool[] | Returned deprecated state of each tier in a tier set |
function totalTiers(
uint256 profileId,
uint256 tierSetId
) external view returns (uint256 total)
Returns the total number of tiers in a tier set
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile that owns the tier set |
tierSetId | uint256 | ID of the tier set to return the total number of tiers within |
Name | Type | Description |
---|---|---|
total | uint256 | Number of total tiers in a tier set |
function totalTierSets(
uint256 profileId
) external view returns (uint256 total)
Returns the total number of tier sets owned by a profile
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile to return the total number of tier sets |
Name | Type | Description |
---|---|---|
total | uint256 | Number of total tier sets in a profile |
function getCurrencyMultiplier(
uint256 profileId,
uint256 tierSetId,
address currency
) external view returns (uint256 multiplier)
Returns the currency multiplier of ERC20 token in a tier set
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile that owns the tier set |
tierSetId | uint256 | ID of the tier set |
currency | address | ERC20 token contract address to return the currency multiplier |
Name | Type | Description |
---|---|---|
multiplier | uint256 | Price multiplier of a ERC20 token |
function isCurrencySupported(
uint256 profileId,
uint256 tierSetId,
address currency
) external view returns (bool supported)
Returns true if a ERC20 token is supported by a tier set
Name | Type | Description |
---|---|---|
profileId | uint256 | ID of the profile that owns the tier set |
tierSetId | uint256 | ID of the tier set |
currency | address | ERC20 token contract address to return if it is supported by a tier set |
Name | Type | Description |
---|---|---|
supported | bool | Returns true if a ERC20 is supported |
Last modified 10mo ago