I have a special needs, store the mapping type struct with assembly code. thank you very for everyone who can response this question.
Need your help how to write something in assembly
Here is how I am trying todo
mapping(uint256 => MyStruct) public myStruct;
struct MyStruct {
uint256 value;
address myAddress;
string email;
}
function addUser(key, value, myaddress, email) public {
MyStruct storage mystructInfo = myStruct[key]
assembly {
sstore(add(mystructInfo.slot, 1), value)
sstore(add(mystructInfo.slot, 2), myAddress)
sstore(add(mystructInfo.slot, 3), email)
}
}