Last active
June 7, 2019 07:18
-
-
Save islishude/309e33f3eb8ce5fbfe10513d420ae30b to your computer and use it in GitHub Desktop.
This file contains hidden or 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.5.0; | |
interface Callable { | |
function test() external returns (address); | |
} | |
// user: 0xca35b7d915458ef540ade6068dfe2f44e8fa733c | |
// TestAddress: 0xbbf289d846208c16edc8474705c748aff07732db | |
// CallAddress: 0x692a70d2e424a56d2c6c27aa97d1a86395877b3a | |
// user call Test.callTest(CallAddress) | |
// msg.sender == TestAddress | |
contract Test { | |
constructor() public {} | |
function callTest(address a) public returns (address) { | |
return Callable(a).test(); | |
} | |
} | |
contract Call { | |
uint256 public nonce; | |
constructor() public {} | |
function test() external returns (address) { | |
nonce++; | |
return msg.sender; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment