Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.