RMRKRoyaltiesSplitter
RMRK team
RMRKRoyaltiesSplitter
Smart contract of the RMRK Royalties Spliter module.
This smart contract provides a simple way to share royalties from either native or erc20 payments.
Methods
MAX_BPS
function MAX_BPS() external view returns (uint256)Returns
| Name | Type | Description | 
|---|---|---|
| _0 | uint256 | undefined | 
distributeERC20
function distributeERC20(address currency, uint256 amount) external nonpayableDistributes an ERC20 payment to the beneficiaries.
The payment is distributed according to the shares specified in the constructor.
Parameters
| Name | Type | Description | 
|---|---|---|
| currency | address | The address of the ERC20 token. | 
| amount | uint256 | The amount of tokens to distribute. | 
getBenefiariesAndShares
function getBenefiariesAndShares() external view returns (address[] beneficiaries, uint256[] shares)Returns the list of beneficiaries and their shares.
Returns
| Name | Type | Description | 
|---|---|---|
| beneficiaries | address[] | The list of beneficiaries. | 
| shares | uint256[] | The list of shares. | 
Events
ERCPaymentDistributed
event ERCPaymentDistributed(address indexed sender, address indexed currency, uint256 amount)Parameters
| Name | Type | Description | 
|---|---|---|
sender indexed | address | undefined | 
currency indexed | address | undefined | 
| amount | uint256 | undefined | 
NativePaymentDistributed
event NativePaymentDistributed(address indexed sender, uint256 amount)Parameters
| Name | Type | Description | 
|---|---|---|
sender indexed | address | undefined | 
| amount | uint256 | undefined | 
Errors
FailedToSend
error FailedToSend()InvalidInput
error InvalidInput()OnlyBeneficiary
error OnlyBeneficiary()