Docs
Search
K

RevenuePath

Path

contracts/core/RevenuePath.sol

Contract Interface

Events

ERC20PaymentReleased (address,address,uint256)

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

ERC20RevnueUpdated (address[],uint256[])

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]

EthDistributed (uint256,uint256,address[])

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

OwnershipTransferred (address,address)

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

PaymentReleased (address,uint256)

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

RevenueTiersAdded (address[ ][ ],uint256[][],uint256)

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

RevenueTiersUpdated (address[ ],uint256[ ],uint256,uint256)

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

Methods

addRevenueTier nonpayable (address[][],uint256[][],uint256[])

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.

getCurrentTier()

Purpose: Get the current ongoing tier of revenue path
Visibility: external view
Return Values
type
name
description
uint256
tierNumber
The current tier value

getERC20Released(address,address)

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

getErc20WalletShare(address)

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

getEthWithdrawn(address)

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

getFeeRequirementStatus()

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.

getImmutabilityStatus()

Purpose: Get the revenue path Immutability status
Visibility: external view
Return Values
type
description
bool
true if fee is being accepted, otherwise false.

getPendingEthBalance(address)

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

getPlatformFee()

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 ]

getPlatformWallet()

Purpose: Get the platform wallet address.
Visibility: external view
Return Values
type
description
address
platform wallet address

getRevenuePathName()

Purpose: Get the revenue path name.
Visibility: external view
Return Values
type
description
string
revenue path name

getRevenueProportion(uint256,address)

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

getRevenueTier(uint256)

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

getTierDistributedAmount(uint256)

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

getTotalErc20Released(address)

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.

getTotalEthReleased()

Purpose: Get the total amount of ETH withdrawn from revenue path
Return Values
type
description
uint256
The amount of ETH that has been released.

getTotalRevenueTiers()

Purpose: Get the totalNumber of revenue tiers in the revenue path
Return Values
type
name
description
uint256
total
Total number of revenue tiers

owner()

Purpose: Returns the address of the current path manager.
type
description
address
The address of the path manager

release(address)

Purpose: Releases distributed ETH for the provided address
Parameters
type
name
description
address
account
Address of the user wallet

releaseERC20(address,address)

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

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.