Created
December 11, 2018 14:07
-
-
Save shingonu/d1f0d8865e645788c79df114cfbc48fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract A { | |
address public sender; | |
function setMsgSender() public { | |
sender = msg.sender; | |
} | |
} | |
contract B { | |
address public sender; | |
A a; | |
constructor(address _a) public { | |
sender = msg.sender; | |
a = A(_a); | |
} | |
function callA() public { | |
a.setMsgSender(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment