Update docs

This commit is contained in:
github-actions
2023-07-27 20:32:02 +00:00
parent 20da070199
commit bb109bc064
4 changed files with 26 additions and 5 deletions

View File

@ -34,7 +34,7 @@ abstract contract ERC2771Context is Context {
}
function _msgData() internal view virtual override returns (bytes calldata) {
if (isTrustedForwarder(msg.sender)) {
if (isTrustedForwarder(msg.sender) && msg.data.length >= 20) {
return msg.data[:msg.data.length - 20];
} else {
return super._msgData();

View File

@ -16,6 +16,12 @@ contract ContextMock is Context {
function msgData(uint256 integerValue, string memory stringValue) public {
emit Data(_msgData(), integerValue, stringValue);
}
event DataShort(bytes data);
function msgDataShort() public {
emit DataShort(_msgData());
}
}
contract ContextMockCaller {