Created
October 31, 2022 20:00
-
-
Save ac12644/969ed4864d639b69703556d333deda10 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
... | |
function myDonations() public view returns ( | |
uint256[] memory values, | |
uint256[] memory dates | |
) | |
{ | |
uint256 count = myDonationsCount(); | |
values = new uint256[](count); | |
dates = new uint256[](count); | |
for (uint256 i = 0; i < count; i++) { | |
Donation storage donation = _donations[msg.sender][i]; | |
values[i] = donation.value; | |
dates[i] = donation.date; | |
} | |
return (values, dates); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment