Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
dd2094b8
Commit
dd2094b8
authored
Sep 09, 2019
by
Nicolás Venturo
Committed by
Francisco Giordano
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make _msgSender() payable (#1913)
(cherry picked from commit
52dc14c3
)
parent
c247a21c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Context.sol
contracts/GSN/Context.sol
+1
-1
GSNRecipient.sol
contracts/GSN/GSNRecipient.sol
+2
-2
No files found.
contracts/GSN/Context.sol
View file @
dd2094b8
...
...
@@ -16,7 +16,7 @@ contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address) {
function _msgSender() internal view returns (address
payable
) {
return msg.sender;
}
...
...
contracts/GSN/GSNRecipient.sol
View file @
dd2094b8
...
...
@@ -75,7 +75,7 @@ contract GSNRecipient is IRelayRecipient, Context, GSNBouncerBase {
*
* IMPORTANT: Contracts derived from {GSNRecipient} should never use `msg.sender`, and use {_msgSender} instead.
*/
function _msgSender() internal view returns (address) {
function _msgSender() internal view returns (address
payable
) {
if (msg.sender != _relayHub) {
return msg.sender;
} else {
...
...
@@ -97,7 +97,7 @@ contract GSNRecipient is IRelayRecipient, Context, GSNBouncerBase {
}
}
function _getRelayedCallSender() private pure returns (address result) {
function _getRelayedCallSender() private pure returns (address
payable
result) {
// We need to read 20 bytes (an address) located at array index msg.data.length - 20. In memory, the array
// is prefixed with a 32-byte length value, so we first add 32 to get the memory read index. However, doing
// so would leave the address in the upper 20 bytes of the 32-byte word, which is inconvenient and would
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment