Payment Splitter Upgradeable
PaymentSplitter
This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware that the Ether will be split in this way, since it is handled transparently by the contract. The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim an amount proportional to the percentage of total shares they were assigned. PaymentSplitter
follows a pull payment model. This means that payments are not automatically forwarded to the accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} function.
Methods
payee
Getter for the address of the payee number index
.
Parameters
Name | Type | Description |
---|---|---|
index | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
release
Triggers a transfer to account
of the amount of Ether they are owed, according to their percentage of the total shares and their previous withdrawals.
Parameters
Name | Type | Description |
---|---|---|
account | address payable | undefined |
released
Getter for the amount of Ether already released to a payee.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
shares
Getter for the amount of shares held by an account.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
totalReleased
Getter for the total amount of Ether already released.
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
totalShares
Getter for the total shares held by payees.
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Events
PayeeAdded
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
shares | uint256 | undefined |
PaymentReceived
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
amount | uint256 | undefined |
PaymentReleased
Parameters
Name | Type | Description |
---|---|---|
to | address | undefined |
amount | uint256 | undefined |
Last updated