Created
May 3, 2018 14:42
-
-
Save bulgakovk/23c084ff8b1fd67b56b0cda4e14a7449 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
contract CrowdsaleDAOFactory is DAOFactoryInterface { | |
function createCrowdsaleDAO(string _name, string _description) public { | |
address dao = DAODeployer.deployCrowdsaleDAO(_name, _description); | |
DAODeployer.transferOwnership(dao, msg.sender); | |
} | |
} | |
library DAODeployer { | |
function deployCrowdsaleDAO(string _name, string _description) | |
returns(CrowdsaleDAO dao) { | |
dao = new CrowdsaleDAO(_name, _description); | |
} | |
function transferOwnership(address _dao, address _newOwner) { | |
CrowdsaleDAO(_dao).transferOwnership(_newOwner); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment