Push A Struct Inside A Mapping Solidity

[Solved] Push A Struct Inside A Mapping Solidity | Elixir - Code Explorer | yomemimo.com
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

Answers related to push a struct inside a mapping solidity

Code Explorer Popular Question For Elixir