RevenuePath
contracts/core/RevenuePath.sol
Purpose: Emits when ERC20 payment is withdrawn/claimed by a member
Parameters:
type | name | description |
---|---|---|
address | token | The token address for which withdrawal is made |
address | account | The wallet address to which withdrawal is made |
uint256 | payment | he amount of the given token the wallet has claimed |
Purpose: Emits when erc20 revenue distribution is updated
Parameters:
type | name | description |
---|---|---|
address[ ] | updatedWalletLists | The list of new wallet address for distribution |
uint256[ ] | updatedDistributionLists | The list of distribution for each wallet. Sum must be 10000. [N.B, the base value is 10^4] |
Purpose: Emits when incoming ETH is distributed among members
Parameters
type | name | description |
---|---|---|
uint256 | amount | The amount of ETH that has been distributed in a tier |
uint256 | distributionTier | The tier index at which the distribution is being done. |
address[ ] | walletList | The list of wallet addresses for which ETH has been distributed |
Purpose: Transfers the revenue path ownership to another address
Parameters
type | name | description |
---|---|---|
address | previousOwner | Wallet address of the previous contract owner |
address | newOwner | Wallet address of the new contract owner |
Purpose: Emits when ETH payment is withdrawn/claimed by a member
Parameters
type | name | description |
---|---|---|
address | account | The wallet for which ETH has been claimed for |
uint256 | payment | The amount of ETH that has been paid out to the wallet |
Purpose: Emits when a new revenue tier has been added
Parameters
type | name | description |
---|---|---|
address[ ][ ] | addedWalletLists | The wallet list added to the new tier |
uint256[ ][ ] | addedDistributionLists | The corresponding distribution of the new tier |
uint256 | newTiersCount | Number of new tiers that has been added |
Purpose: Emits when a revenue tier is updated
Parameters
type | name | description |
---|---|---|
address[ ] | updatedWalletList | The new wallet list of the updated tier |
uint256[ ] | updatedDistributionLists | The corresponding distribution of the updated tier |
uint256 | updatedTierNumber | The tier number that has been updated |
uint256 | newLimit | The new limit of the updated tier |
Purpose: Adds multiple revenue tiers. Only for mutable revenue path
Visibility:
external
Parameters
type | name | description |
---|---|---|
address[ ][ ] | _walletList | A nested array list of member wallets |
uint256[ ][ ] | _distribution | A nested array list of distribution percentages |
uint256[ ] | previousTierLimit | A list of tier limits, starting with the current last tier's new limit. |
Purpose: Get the current ongoing tier of revenue path
Visibility:
external view
Return Values
type | name | description |
---|---|---|
uint256 | tierNumber | The current tier value |
Purpose: Get the amount of ERC20 accumulated for a given account
Visibility:
external view
Parameters
type | name | description |
---|---|---|
address | token | Address of the token |
address | account | Address of the user wallet |
Return Values
type | name | description |
---|---|---|
uint256 | amount | The amount of the given ERC20 address that has been released |
Purpose: Get the erc20 revenue share percentage for given account
Visibility:
external view
Parameters
type | name | description |
---|---|---|
address | account | Address of the user wallet |
Return Values
type | description |
---|---|
uint256 | erc20 revenue share percentage |
Purpose: Get the amount of total ETH withdrawn by the account
Visibility:
external view
Parameters
type | name | description |
---|---|---|
address | account | Address of the user wallet |
Return Values
type | description |
---|---|
uint256 | amount of total ETH withdrawn by the account |
Purpose: Returns whether revenue path is collecting fee or not
Visibility:
external view
Return Values
type | name | description |
---|---|---|
bool | required | true if fee is being accepted, otherwise false. |
Purpose: Get the revenue path Immutability status
Visibility:
external view
Return Values
type | description |
---|---|
bool | true if fee is being accepted, otherwise false. |
Purpose: Get the pending ETH balance for given address.
Visibility:
external view
Parameters
type | name | description |
---|---|---|
address | account | Address of the user wallet |
Return Values
type | name | description |
---|---|---|
uint256 | pendingAmount | Amount of eth pending for the given address |
Purpose: Get the platform fee percentage.
Visibility:
external view
Return Values
type | description |
---|---|
uint256 | returns fee percentage. [ N.B: The fee also follows the base 10^4 ] |
Purpose: Get the platform wallet address.
Visibility:
external view
Return Values
type | description |
---|---|
address | platform wallet address |
Purpose: Get the revenue path name.
Visibility:
external view
Return Values
type | description |
---|---|
string | revenue path name |
Purpose: Get the ETH revenue proportion for a given account at a given tier
Visibility:
external view
Parameters
type | name | description |
---|---|---|
uint256 | tier | The tier number |
address | account | Address of the user wallet |
Return Values
type | name | description |
---|---|---|
uint256 | proportion | The distribution for the given account & tier number |
Purpose:Get the limit amount & wallet list for a given revenue tier
Visibility:
external view
Parameters
type | name | description |
---|---|---|
uint256 | tierNumber | The index of the tier for which list needs to be provided. |
Return Values: Object with following parameters
type | name | description |
---|---|---|
uint256 | _limitAmount | The tier number |
address | _walletList | Address of the user wallet |
Purpose: Get the amount of ETH distributed for a given tier
Visibility:
external view
Parameters
type | name | description |
---|---|---|
uint256 | tier | The index of the tier. |
Return Values
type | name | description |
---|---|---|
uint256 | amount | The amount of ETH distributed for a given tier |
Purpose: Get the total ERC-20 released from the revenue path for a given ERC-20 token.
Visibility:
external view
Parameters
type | name | description |
---|---|---|
address | token | The address of the ERC-20 token |
Return Values
type | description |
---|---|
uint256 | The amount of ERC-20 that has been released. |
Purpose: Get the total amount of ETH withdrawn from revenue path
Return Values
type | description |
---|---|
uint256 | The amount of ETH that has been released. |
Purpose: Get the totalNumber of revenue tiers in the revenue path
Return Values
type | name | description |
---|---|---|
uint256 | total | Total number of revenue tiers |
Purpose: Returns the address of the current path manager.
type | description |
---|---|
address | The address of the path manager |
Purpose: Releases distributed ETH for the provided address
Parameters
type | name | description |
---|---|---|
address | account | Address of the user wallet |
Purpose: Releases allocated ERC-20 for the provided address
Parameters
type | name | description |
---|---|---|
address | token | The address of the ERC20 token |
address | account | The member's wallet address |
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
- Parameters
- address newOwner
Update ERC-20 revenue distribution. Only for mutable revenue path
- Parameters
- address[] _walletList: A list of member wallets
- uint256[] _distribution: A list of distribution percentages
Update given revenue tier. Only for mutable revenue path
- Parameters
- address[] _walletList: A list of member wallets
- uint256[] _distribution: A list of distribution percentages
- uint256 newLimit: The new limit of the requested tier
- uint256 tierNumber: The tier index for which update is being requested.
Last modified 1yr ago