Skip to content

Commit 52dc14c

Browse files
authored
Make _msgSender() payable (#1913)
1 parent 6148abb commit 52dc14c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

contracts/GSN/Context.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ contract Context {
1616
constructor () internal { }
1717
// solhint-disable-previous-line no-empty-blocks
1818

19-
function _msgSender() internal view returns (address) {
19+
function _msgSender() internal view returns (address payable) {
2020
return msg.sender;
2121
}
2222

contracts/GSN/GSNRecipient.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ contract GSNRecipient is IRelayRecipient, Context, GSNBouncerBase {
7575
*
7676
* IMPORTANT: Contracts derived from {GSNRecipient} should never use `msg.sender`, and use {_msgSender} instead.
7777
*/
78-
function _msgSender() internal view returns (address) {
78+
function _msgSender() internal view returns (address payable) {
7979
if (msg.sender != _relayHub) {
8080
return msg.sender;
8181
} else {
@@ -97,7 +97,7 @@ contract GSNRecipient is IRelayRecipient, Context, GSNBouncerBase {
9797
}
9898
}
9999

100-
function _getRelayedCallSender() private pure returns (address result) {
100+
function _getRelayedCallSender() private pure returns (address payable result) {
101101
// We need to read 20 bytes (an address) located at array index msg.data.length - 20. In memory, the array
102102
// is prefixed with a 32-byte length value, so we first add 32 to get the memory read index. However, doing
103103
// so would leave the address in the upper 20 bytes of the 32-byte word, which is inconvenient and would

0 commit comments

Comments
 (0)