Hi everyone,
I compile this part of code (context) :
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this;
return msg.data;
}
}
and I get this error :
Data location must be "storage" or "memory" for return parameter in function, but "calldata" was given.
function _msgData() internal view virtual returns (bytes calldata)
Can someone explain to me what is going on ? (I'm a beginner)
Oct 3, 2021, 4:57 PM