Skip to main content
Version: v2.0_alpha

SimpleProjectRegistry

This contract is a simple registry of projects it does not allow to remove projects either

This does not constrain the number of projects which might be > vote options it does not prevent duplicate addresses from being added as projects

projects

address[] projects

constructor

constructor() public payable

Create a new instance of the registry contract

addProject

function addProject(address project) external

Add a project to the registry

Parameters

NameTypeDescription
projectaddressThe address of the project to add

addProjects

function addProjects(address[] _projects) external

Add multiple projects to the registry

Parameters

NameTypeDescription
_projectsaddress[]The addresses of the projects to add

getProject

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

Get a project

Parameters

NameTypeDescription
indexuint256The index of the project

Return Values

NameTypeDescription
[0]addressThe address of the project

getProjects

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

Get all projects

Return Values

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

getProjectsNumber

function getProjectsNumber() external view returns (uint256)

Get the number of projects

Return Values

NameTypeDescription
[0]uint256The number of projects