2018-02-28 04:36:48 +00:00
|
|
|
pragma solidity ^0.4.17;
|
|
|
|
|
|
|
|
import "../deploy/Factory.sol";
|
2018-03-04 06:31:07 +00:00
|
|
|
import "../deploy/DelayedUpdatableInstance.sol";
|
2018-02-28 04:36:48 +00:00
|
|
|
import "./IdentityKernel.sol";
|
|
|
|
|
2018-02-28 18:52:32 +00:00
|
|
|
|
2018-02-28 04:36:48 +00:00
|
|
|
contract IdentityFactory is Factory {
|
|
|
|
|
|
|
|
event IdentityCreated(address instance);
|
|
|
|
|
|
|
|
function IdentityFactory(bytes _infohash)
|
|
|
|
public
|
2018-02-28 18:52:32 +00:00
|
|
|
Factory(new IdentityKernel(), _infohash)
|
2018-02-28 04:36:48 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
function createIdentity()
|
|
|
|
external
|
|
|
|
{
|
|
|
|
createIdentity(msg.sender);
|
|
|
|
}
|
|
|
|
|
|
|
|
function createIdentity(address _idOwner)
|
|
|
|
public
|
|
|
|
{
|
2018-03-04 06:31:07 +00:00
|
|
|
IdentityKernel instance = IdentityKernel(new DelayedUpdatableInstance(address(latestKernel)));
|
2018-02-28 04:36:48 +00:00
|
|
|
instance.initIdentity(_idOwner);
|
|
|
|
IdentityCreated(address(instance));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|