visual-identity/contracts/democracy/DelegationProxyFactory.sol

29 lines
809 B
Solidity
Raw Normal View History

2018-03-28 02:15:36 +00:00
pragma solidity ^0.4.21;
2017-11-28 03:33:25 +00:00
2018-03-28 02:15:36 +00:00
import "./DelegationProxyInterface.sol";
import "./DelegationProxyKernel.sol";
import "../deploy/Factory.sol";
import "../deploy/Instance.sol";
2017-11-28 03:33:25 +00:00
/**
* @title DelegationProxyFactory
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
* @dev Upgradable delegation proxy factory
*/
2018-03-28 02:15:36 +00:00
contract DelegationProxyFactory is Factory {
2017-11-28 03:33:25 +00:00
2018-05-22 10:46:29 +00:00
constructor()
2018-03-28 02:15:36 +00:00
Factory(new DelegationProxyKernel())
public
{ }
2017-11-28 03:33:25 +00:00
2018-03-28 02:15:36 +00:00
function createDelegationProxy(address _parent)
external
returns (DelegationProxyInterface)
{
DelegationProxyKernel instance = DelegationProxyKernel(address(new Instance(latestKernel)));
instance.initializeDelegationProxy(_parent);
return DelegationProxyInterface(address(instance));
2017-11-28 03:33:25 +00:00
}
}