RevenuePath
Path
contracts/core/RevenuePath.sol
Contract Interface
Events
ERC20PaymentReleased (address,address,uint256)
ERC20PaymentReleased (address,address,uint256)
Purpose: Emits when ERC20 payment is withdrawn/claimed by a member
Parameters:
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
ERC20RevnueUpdated (address[],uint256[])
ERC20RevnueUpdated (address[],uint256[])
Purpose: Emits when erc20 revenue distribution is updated
Parameters:
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]
EthDistributed (uint256,uint256,address[])
EthDistributed (uint256,uint256,address[])
Purpose: Emits when incoming ETH is distributed among members
Parameters
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
OwnershipTransferred (address,address)
OwnershipTransferred (address,address)
Purpose: Transfers the revenue path ownership to another address
Parameters
address
previousOwner
Wallet address of the previous contract owner
address
newOwner
Wallet address of the new contract owner
PaymentReleased (address,uint256)
PaymentReleased (address,uint256)
Purpose: Emits when ETH payment is withdrawn/claimed by a member
Parameters
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
RevenueTiersAdded (address[ ][ ],uint256[][],uint256)
RevenueTiersAdded (address[ ][ ],uint256[][],uint256)
Purpose: Emits when a new revenue tier has been added
Parameters
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
RevenueTiersUpdated (address[ ],uint256[ ],uint256,uint256)
RevenueTiersUpdated (address[ ],uint256[ ],uint256,uint256)
Purpose: Emits when a revenue tier is updated
Parameters
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
Methods
addRevenueTier nonpayable (address[][],uint256[][],uint256[])
addRevenueTier nonpayable (address[][],uint256[][],uint256[])
Purpose: Adds multiple revenue tiers. Only for mutable revenue path
Visibility: external
Parameters
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.
getCurrentTier()
getCurrentTier()
Purpose: Get the current ongoing tier of revenue path
Visibility: external view
Return Values
uint256
tierNumber
The current tier value
getERC20Released(address,address)
getERC20Released(address,address)
Purpose: Get the amount of ERC20 accumulated for a given account
Visibility: external view
Parameters
address
token
Address of the token
address
account
Address of the user wallet
Return Values
uint256
amount
The amount of the given ERC20 address that has been released
getErc20WalletShare(address)
getErc20WalletShare(address)
Purpose: Get the erc20 revenue share percentage for given account
Visibility: external view
Parameters
address
account
Address of the user wallet
Return Values
uint256
erc20 revenue share percentage
getEthWithdrawn(address)
getEthWithdrawn(address)
Purpose: Get the amount of total ETH withdrawn by the account
Visibility: external view
Parameters
address
account
Address of the user wallet
Return Values
uint256
amount of total ETH withdrawn by the account
getFeeRequirementStatus()
getFeeRequirementStatus()
Purpose: Returns whether revenue path is collecting fee or not
Visibility: external view
Return Values
bool
required
true if fee is being accepted, otherwise false.
getImmutabilityStatus()
getImmutabilityStatus()
Purpose: Get the revenue path Immutability status
Visibility: external view
Return Values
bool
true if fee is being accepted, otherwise false.
getPendingEthBalance(address)
getPendingEthBalance(address)
Purpose: Get the pending ETH balance for given address.
Visibility: external view
Parameters
address
account
Address of the user wallet
Return Values
uint256
pendingAmount
Amount of eth pending for the given address
getPlatformFee()
getPlatformFee()
Purpose: Get the platform fee percentage.
Visibility: external view
Return Values
uint256
returns fee percentage. [ N.B: The fee also follows the base 10^4 ]
getPlatformWallet()
getPlatformWallet()
Purpose: Get the platform wallet address.
Visibility: external view
Return Values
address
platform wallet address
getRevenuePathName()
getRevenuePathName()
Purpose: Get the revenue path name.
Visibility: external view
Return Values
string
revenue path name
getRevenueProportion(uint256,address)
getRevenueProportion(uint256,address)
Purpose: Get the ETH revenue proportion for a given account at a given tier
Visibility: external view
Parameters
uint256
tier
The tier number
address
account
Address of the user wallet
Return Values
uint256
proportion
The distribution for the given account & tier number
getRevenueTier(uint256)
getRevenueTier(uint256)
Purpose:Get the limit amount & wallet list for a given revenue tier
Visibility: external view
Parameters
uint256
tierNumber
The index of the tier for which list needs to be provided.
Return Values: Object with following parameters
uint256
_limitAmount
The tier number
address
_walletList
Address of the user wallet
getTierDistributedAmount(uint256)
getTierDistributedAmount(uint256)
Purpose: Get the amount of ETH distributed for a given tier
Visibility: external view
Parameters
uint256
tier
The index of the tier.
Return Values
uint256
amount
The amount of ETH distributed for a given tier
getTotalErc20Released(address)
getTotalErc20Released(address)
Purpose: Get the total ERC-20 released from the revenue path for a given ERC-20 token.
Visibility: external view
Parameters
address
token
The address of the ERC-20 token
Return Values
uint256
The amount of ERC-20 that has been released.
getTotalEthReleased()
getTotalEthReleased()
Purpose: Get the total amount of ETH withdrawn from revenue path
Return Values
uint256
The amount of ETH that has been released.
getTotalRevenueTiers()
getTotalRevenueTiers()
Purpose: Get the totalNumber of revenue tiers in the revenue path
Return Values
uint256
total
Total number of revenue tiers
owner()
owner()
Purpose: Returns the address of the current path manager.
address
The address of the path manager
release(address)
release(address)
Purpose: Releases distributed ETH for the provided address
Parameters
address
account
Address of the user wallet
releaseERC20(address,address)
releaseERC20(address,address)
Purpose: Releases allocated ERC-20 for the provided address
Parameters
address
token
The address of the ERC20 token
address
account
The member's wallet address
renounceOwnership()
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.
transferOwnership nonpayable (address)
Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.
Parameters
address newOwner
updateErc20Distrbution nonpayable (address[],uint256[])
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
updateRevenueTier nonpayable (address[],uint256[],uint256,uint256)
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 updated