Skip to content

Instantly share code, notes, and snippets.

@ankitbrahmbhatt1997
Last active February 21, 2019 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitbrahmbhatt1997/c43716b4648aa412b12cf1da26419496 to your computer and use it in GitHub Desktop.
Save ankitbrahmbhatt1997/c43716b4648aa412b12cf1da26419496 to your computer and use it in GitHub Desktop.
Storage Variables
// Defining a Struct for a Spending Request
struct Request {
string description;
uint value;
address recipient;
bool completed;
uint numberOfVoters;
mapping(address=>bool) voters;
}
// STORAGE VARIABLES
mapping(address=>uint) public contributions;
uint public totalContributors; // TOTAL COUNT OF CONTRIBUTORS
uint public minimumContribution;
uint public deadline; // DEADLINE IN BLOCK NUMBER
uint public goal; // AMOUNT NEEDS TO BE RAISED
uint public raisedAmount = 0 ; // AMOUNT RAISED
address public admin; // PROJECT OWNER
Request[] public requests;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment