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
Name | Type | Description |
---|---|---|
project | address | The address of the project to add |
addProjects
function addProjects(address[] _projects) external
Add multiple projects to the registry
Parameters
Name | Type | Description |
---|---|---|
_projects | address[] | The addresses of the projects to add |
getProject
function getProject(uint256 index) external view returns (address)
Get a project
Parameters
Name | Type | Description |
---|---|---|
index | uint256 | The index of the project |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | The address of the project |
getProjects
function getProjects() external view returns (address[])
Get all projects
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | The addresses of the projects |
getProjectsNumber
function getProjectsNumber() external view returns (uint256)
Get the number of projects
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The number of projects |