2018-02-28 04:36:48 +00:00
|
|
|
pragma solidity ^0.4.17;
|
|
|
|
|
|
|
|
import "../deploy/Factory.sol";
|
|
|
|
import "../deploy/UpdatableInstance.sol";
|
|
|
|
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
|
|
|
|
{
|
|
|
|
IdentityKernel instance = IdentityKernel(new UpdatableInstance(address(latestKernel)));
|
|
|
|
instance.initIdentity(_idOwner);
|
|
|
|
IdentityCreated(address(instance));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|