Skip to content

Instantly share code, notes, and snippets.

@Sowmayjain
Created February 11, 2018 19:22
Show Gist options
  • Save Sowmayjain/3db3bf663ac7280ec6c271e21082d0d6 to your computer and use it in GitHub Desktop.
Save Sowmayjain/3db3bf663ac7280ec6c271e21082d0d6 to your computer and use it in GitHub Desktop.
The smart contract helps to keep a record of MoatCoin Board Application
pragma solidity ^0.4.18;
contract Board {
// mapping of address with their and storing the time
mapping(address => uint) public Members;
// array of addresses of all the moatcoin application
address[] public ApplyArr;
// apply for moatcoin membership
function apply() public returns (bool) {
require(Members[msg.sender] == 0); // must consist a
ApplyArr.push(msg.sender);
Members[msg.sender] = block.number;
return true;
}
// get the array data of members
function getFullArr() public view returns (address[]) {
return ApplyArr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment