mirror of
https://github.com/status-im/EIPs.git
synced 2025-02-23 12:18:16 +00:00
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:
parent
163409ee3a
commit
5fd5c6b855
@ -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)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user