Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
Add registerIdentity function for registering an existing proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
pelle committed May 19, 2017
1 parent 3485cf7 commit dbc7fb8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contracts/IdentityManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ contract IdentityManager {
IdentityCreated(identity, msg.sender, owner, recoveryKey);
}

// An identity Proxy can use this to register itself with the IdentityManager
// Note they also have to change the owner of the Proxy over to this, but after calling this
function registerIdentity(address owner, address recoveryKey) {
if (owners[msg.sender][owner] > 0 || recoveryKeys[msg.sender] > 0 ) throw; // Deny any funny business
owners[msg.sender][owner] = now - 1 days; // This is to ensure original owner has full power from day one
recoveryKeys[msg.sender] = recoveryKey;
IdentityCreated(msg.sender, msg.sender, owner, recoveryKey);
}


function forwardTo(Proxy identity, address destination, uint value, bytes data) onlyOwner(identity) {
identity.forward(destination, value, data);
}
Expand Down

0 comments on commit dbc7fb8

Please sign in to comment.