i am working on a crowdsale type of smart contract and i want to store everyone who sent ether to my contract .So i created a struture like this
struct User {
address participantsAddress;
uint id;
uint participantETHamount;
}
and my payable function like this :
function invest() external payable {
balanceOfContract=balanceOfContract+msg.value;
mydata[id].participantETHamount = msg.value;
mydata[id].participantsAddress = msg.sender;
id++;
}
but when I am debugging it, it seems like it doesn't store the values !!