SimpleRecipientRegistry
This contract is a simple registry of recipients it does not allow to remove recipients either
This does not constrain the number of recipients which might be > vote options it does not prevent duplicate addresses from being added as recipients
recipients
address[] recipients
constructor
constructor() public payable
Create a new instance of the registry contract
addRecipient
function addRecipient(address recipient) external
Add a recipient to the registry
Parameters
Name | Type | Description |
---|---|---|
recipient | address | The address of the recipient to add |
addRecipients
function addRecipients(address[] _recipients) external
Add multiple recipients to the registry
Parameters
Name | Type | Description |
---|---|---|
_recipients | address[] | The addresses of the recipients to add |
getRecipient
function getRecipient(uint256 index) external view returns (address)
Get a recipient from the registry
Parameters
Name | Type | Description |
---|---|---|
index | uint256 | The index of the recipient |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | The address of the recipient |
getRecipients
function getRecipients() external view returns (address[])
Get all recipients
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | The addresses of the recipients |
getRecipientsNumber
function getRecipientsNumber() external view returns (uint256)
Get the number of recipients
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The number of recipients |