Automatically merged updates to draft EIP(s) 2771 (#3216)

Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft, Review, or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
This commit is contained in:
Dror Tirosh 2021-01-23 15:42:14 +02:00 committed by GitHub
parent 163409ee3a
commit 5fd5c6b855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,16 +149,16 @@ contract RecipientExample {
_trustedForwarder = trustedForwarder;
}
function isTrustedForwarder(address forwarder) external returns(bool) {
function isTrustedForwarder(address forwarder) public returns(bool) {
return forwarder == _trustedForwarder;
}
function _msgSender() internal view returns (address payable signer) {
signer = msg.sender;
if (isTrustedForwarder(signer)) {
bytes memory data = msg.data;
uint256 length = msg.data.length;
assembly { signer := mload(add(data, length))) }
if (msg.data.length>=20 && isTrustedForwarder(signer)) {
assembly {
signer := shr(96,calldataload(sub(calldatasize(),20)))
}
}
}