snt-gas-relay/contracts/identity/IdentityFactory.sol

33 lines
699 B
Solidity

pragma solidity ^0.4.17;
import "../deploy/Factory.sol";
import "../deploy/UpdatableInstance.sol";
import "./IdentityKernel.sol";
contract IdentityFactory is Factory {
event IdentityCreated(address instance);
function IdentityFactory(bytes _infohash)
public
Factory(new IdentityKernel(), _infohash)
{
}
function createIdentity()
external
{
createIdentity(msg.sender);
}
function createIdentity(address _idOwner)
public
{
IdentityKernel instance = IdentityKernel(new UpdatableInstance(address(latestKernel)));
instance.initIdentity(_idOwner);
IdentityCreated(address(instance));
}
}