mirror of
https://github.com/status-im/topic-democracy.git
synced 2025-02-25 16:45:20 +00:00
29 lines
754 B
Solidity
29 lines
754 B
Solidity
|
pragma solidity ^0.4.21;
|
||
|
|
||
|
import "./DelegationInterface.sol";
|
||
|
import "./DelegationKernel.sol";
|
||
|
import "../deploy/Factory.sol";
|
||
|
import "../deploy/Instance.sol";
|
||
|
|
||
|
/**
|
||
|
* @title DelegationFactory
|
||
|
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
|
||
|
* @dev Upgradable delegation proxy factory
|
||
|
*/
|
||
|
contract DelegationFactory is Factory {
|
||
|
|
||
|
constructor()
|
||
|
Factory(new DelegationKernel())
|
||
|
public
|
||
|
{ }
|
||
|
|
||
|
function createDelegation(address _parent)
|
||
|
external
|
||
|
returns (DelegationInterface)
|
||
|
{
|
||
|
DelegationKernel instance = DelegationKernel(address(new Instance(latestKernel)));
|
||
|
instance.initializeDelegation(_parent);
|
||
|
return DelegationInterface(address(instance));
|
||
|
}
|
||
|
|
||
|
}
|