Skip to content

Instantly share code, notes, and snippets.

@mswezey23
Last active March 18, 2019 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mswezey23/b15085cc7339bf6d06f88b056a631326 to your computer and use it in GitHub Desktop.
Save mswezey23/b15085cc7339bf6d06f88b056a631326 to your computer and use it in GitHub Desktop.
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