donate | This function takes a fund ID, token address and donation amount. Ask _depositToSafe function with _getDepositAddress function with the parameters to safely deposit the amount with related token address. Returns true if it is completed successfully. |
getRecord | This function takes an ID and returns the related donation record from mapping. Record is a struct in Donations.sol. Please refer it for detailed information. |
_getDepositAddress | Returns the address of the ERC721 minter contract. Asks FundManager.sol for the wallet address of that _fundId if that fund accepts deposit with related _tokenAddress. Other case reverts. |
_recordDonation | Auto increments the previous donation ID produced by using OpenZeppelin’s Counters.sol contract. Records it into donations mapping with donator, fundId, amount and token data. Returns the incremented donationId. |
_depositToSafe | Mints NFT for donator with fund specific id and returns the NFT id with tokenId parameter. Uses mint function of OpenZeppelin. |
_mint | Mints NFT for donator with fund specific id and returns the NFT id with tokenId parameter. Uses mint function of OpenZeppelin. |