Skip to main content
Version: v2.0_alpha

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

NameTypeDescription
recipientaddressThe address of the recipient to add

addRecipients

function addRecipients(address[] _recipients) external

Add multiple recipients to the registry

Parameters

NameTypeDescription
_recipientsaddress[]The addresses of the recipients to add

getRecipient

function getRecipient(uint256 index) external view returns (address)

Get a recipient from the registry

Parameters

NameTypeDescription
indexuint256The index of the recipient

Return Values

NameTypeDescription
[0]addressThe address of the recipient

getRecipients

function getRecipients() external view returns (address[])

Get all recipients

Return Values

NameTypeDescription
[0]address[]The addresses of the recipients

getRecipientsNumber

function getRecipientsNumber() external view returns (uint256)

Get the number of recipients

Return Values

NameTypeDescription
[0]uint256The number of recipients