Last active
March 18, 2019 17:26
-
-
Save mswezey23/b15085cc7339bf6d06f88b056a631326 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.5.6; | |
interface DeployInterface { | |
function foo() external returns (uint256); | |
} | |
contract DeploySecond is DeployInterface { | |
function foo() external returns (uint256) { | |
return 2; | |
} | |
} | |
contract DeployThird is DeployInterface { | |
function foo() external returns (uint256) { | |
return 3; | |
} | |
} | |
contract deployFirst { | |
DeployInterface contractInstance; | |
function setContractInstance(address _contractInstance) public { | |
contractInstance = DeployInterface(_contractInstance); | |
} | |
function execDoThing() public returns (uint256) { | |
return contractInstance.foo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment