Created
February 11, 2018 19:22
-
-
Save Sowmayjain/3db3bf663ac7280ec6c271e21082d0d6 to your computer and use it in GitHub Desktop.
The smart contract helps to keep a record of MoatCoin Board Application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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