I am very new to solidity and quite honestly I'm scratching my head a lot.
I am trying to create a contract where a company can facilitate donations. Anyone can apply for a donation, supplying their name, organization type and some general contact details. In order to receive, donations applicants need to be approved first. The owner can select people that are able to approve organizations
I have set up my modifiers and i want to write the first function of allowing the owner to select people to be facilitators that can approve applicants. How would I do this?
contract DonationContract
{
address owner;
struct Applicant
{
address Appl;
string Name;
string OrgType;
string Number;
string Email;
uint256 Funds;
bool approved;
}
mapping (address => Applicant) applicants;
modifier Owner()
{
require(msg.sender == owner);
_;
}
modifier Approved()
{
require(applicants[msg.sender].approved == true);
_;
}
function approve(address Org) Owner public
{
applicants[Org].approved = true;
}
}