Question : Push a struct inside a mapping solidity
Answered by : roberto-zito
donationsMap[_recipient] = Donation(id++,amount,_donor,_msg,block.timestamp);
donationsList.push(Donation(id++,amount,_donor,_msg,block.timestamp));
Source : https://ethereum.stackexchange.com/questions/101609/how-to-push-a-struct-into-a-mapping-of-structs | Last Update : Wed, 13 Jul 22