Skip to content

Instantly share code, notes, and snippets.

@ac12644
Last active October 31, 2022 20:31
Show Gist options
  • Save ac12644/422047c23c73f9deaaf3533c62faf62e to your computer and use it in GitHub Desktop.
Save ac12644/422047c23c73f9deaaf3533c62faf62e to your computer and use it in GitHub Desktop.
...
event FundraiserCreated(Fundraiser indexed fundraiser, address indexed owner);
function createFundraiser(
string memory name,
string memory image,
string memory description,
uint256 goalAmount,
address payable beneficiary
) public {
Fundraiser fundraiser = new Fundraiser(
name,
image,
description,
goalAmount,
beneficiary,
msg.sender
);
_fundraisers.push(fundraiser);
emit FundraiserCreated(fundraiser, msg.sender);
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment